diff options
author | Joop Kiefte <ikojba@gmail.com> | 2020-09-12 12:36:55 +0200 |
---|---|---|
committer | Joop Kiefte <ikojba@gmail.com> | 2020-09-12 12:36:55 +0200 |
commit | 9e0d2666df95fdf04b392321ef9772ec2d8d5ee0 (patch) | |
tree | cd151804bd81d84557026d1d3058ba28045b4e55 | |
parent | bd6821b1d21ff6ddf0630a92f832a8d5acde1a70 (diff) |
Add comments
-rw-r--r-- | tris/core.go | 2 |
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 |