From 9e0d2666df95fdf04b392321ef9772ec2d8d5ee0 Mon Sep 17 00:00:00 2001 From: Joop Kiefte Date: Sat, 12 Sep 2020 12:36:55 +0200 Subject: Add comments --- tris/core.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tris/core.go') diff --git a/tris/core.go b/tris/core.go index d0164e2..dc80efe 100644 --- a/tris/core.go +++ b/tris/core.go @@ -9,10 +9,12 @@ type Point struct { X, Y int } +// Add adds two points together func (p Point) Add(q Point) Point { return Point{X: p.X+q.X, Y: p.Y+q.Y} } +// A piece contains a value per rotation type Piece [4]uint16 // A table that represents each piece from https://tetris.fandom.com/wiki/SRS -- cgit v1.2.3-70-g09d2