aboutsummaryrefslogtreecommitdiff
path: root/tris/move.go
diff options
context:
space:
mode:
authorJoop Kiefte <ikojba@gmail.com>2020-09-12 09:32:20 +0200
committerJoop Kiefte <ikojba@gmail.com>2020-09-12 09:32:20 +0200
commit129b44e56f546a4a80f4a70aeadcc89c77f9eee4 (patch)
treefac75e1d1574ffd386388677dcb2e8c50270d317 /tris/move.go
parent901952561d272c64a6fe31d303b06768389826d1 (diff)
Add floor detection to free pieces and correct collision detection field, should fix #1v0.1.1
Diffstat (limited to 'tris/move.go')
-rw-r--r--tris/move.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/tris/move.go b/tris/move.go
index 29140b8..26dd568 100644
--- a/tris/move.go
+++ b/tris/move.go
@@ -12,7 +12,7 @@ func (p Placement) Move(f Field, rot Rotation, x, y int) (np Placement, floor, t
np.X = x
np.Y = y
if !np.Collide(f) { // free air
- return np, false, false
+ return np, np.Floor(f), false
}
np = p // last resort reset p
if np.Floor(f) && np.Y < 0 {