From c3da6b22c767d79970d98df181bf5eb89bf55b93 Mon Sep 17 00:00:00 2001 From: Joop Kiefte Date: Sun, 20 Sep 2020 10:25:03 +0200 Subject: Add hold box --- 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 6963294..089dca4 100644 --- a/tris/core.go +++ b/tris/core.go @@ -20,6 +20,7 @@ type Piece [4]uint16 // A table that represents each piece from https://tetris.fandom.com/wiki/SRS // in binary starting with 1 top left going per row, here in hexadecimal shorthand. var ( + EmptyPiece = Piece{} IPiece = Piece{0x0F00, 0x4444, 0x00F0, 0x2222} JPiece = Piece{0x1700, 0x6220, 0x0740, 0x2230} LPiece = Piece{0x4700, 0x2260, 0x0710, 0x3220} @@ -130,6 +131,7 @@ func (b Bag) Randomize() Bag { } func (b Bag) Pick() (Bag, Placement) { + Swapped = false if len(b) == 0 { b = NewBag() } -- cgit v1.2.3-70-g09d2