diff options
Diffstat (limited to 'tris/core.go')
-rw-r--r-- | tris/core.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tris/core.go b/tris/core.go index 4824ead..af46311 100644 --- a/tris/core.go +++ b/tris/core.go @@ -9,6 +9,10 @@ type Point struct { X, Y int } +func (p Point) Add(q Point) Point { + return Point{X: p.X+q.X, Y: p.Y+q.Y} +} + type Piece [4]uint16 // A table that represents each piece from https://tetris.fandom.com/wiki/SRS |