aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoop Kiefte <ikojba@gmail.com>2020-09-12 12:36:55 +0200
committerJoop Kiefte <ikojba@gmail.com>2020-09-12 12:36:55 +0200
commit9e0d2666df95fdf04b392321ef9772ec2d8d5ee0 (patch)
treecd151804bd81d84557026d1d3058ba28045b4e55
parentbd6821b1d21ff6ddf0630a92f832a8d5acde1a70 (diff)
Add comments
-rw-r--r--tris/core.go2
1 files changed, 2 insertions, 0 deletions
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