aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoop Kiefte <ikojba@gmail.com>2020-09-12 12:38:40 +0200
committerJoop Kiefte <ikojba@gmail.com>2020-09-12 12:38:40 +0200
commit8324a82224026574bbfe866cc16a1adae5c1aec2 (patch)
tree81c8d06053c9398c0c65bf6eac5113799cac69b9
parent9e0d2666df95fdf04b392321ef9772ec2d8d5ee0 (diff)
Correct spawn (actually correcting piece to coordinates translation)v0.1.3
-rw-r--r--tris/core.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/tris/core.go b/tris/core.go
index dc80efe..8a9c16b 100644
--- a/tris/core.go
+++ b/tris/core.go
@@ -77,7 +77,7 @@ func (p Placement) Field() (Field, bool) {
func (p Placement) Points() []Point {
piece := p.piece[p.Rot]
var points []Point
- x := []int{0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3}
+ x := []int{3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0}
y := []int{0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3}
for bm, i := uint16(0x8000), 0; i < 16; bm, i = bm >> 1, i + 1 {
if piece&bm == bm {