From efc9585abc6db21b2c882a361c7bddee1a2b13fa Mon Sep 17 00:00:00 2001 From: Joop Kiefte Date: Mon, 7 Sep 2020 05:39:11 +0200 Subject: Adding foundation for wall kicks --- tris/core.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tris/core.go') 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 -- cgit v1.2.3-70-g09d2