aboutsummaryrefslogtreecommitdiff
path: root/tris/core.go
diff options
context:
space:
mode:
authorJoop Kiefte <ikojba@gmail.com>2020-09-20 10:25:03 +0200
committerJoop Kiefte <ikojba@gmail.com>2020-09-20 10:25:03 +0200
commitc3da6b22c767d79970d98df181bf5eb89bf55b93 (patch)
tree9c1f0324c1f307a2a092c8f9d7b5c5796a431b64 /tris/core.go
parentde36bfd4aecb683c128fb4294de545317fc0edab (diff)
Add hold boxv1.0.0
Diffstat (limited to 'tris/core.go')
-rw-r--r--tris/core.go2
1 files changed, 2 insertions, 0 deletions
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()
}