diff options
author | Joop Kiefte <ikojba@gmail.com> | 2020-09-12 09:32:20 +0200 |
---|---|---|
committer | Joop Kiefte <ikojba@gmail.com> | 2020-09-12 09:32:20 +0200 |
commit | 129b44e56f546a4a80f4a70aeadcc89c77f9eee4 (patch) | |
tree | fac75e1d1574ffd386388677dcb2e8c50270d317 /tris/core.go | |
parent | 901952561d272c64a6fe31d303b06768389826d1 (diff) |
Add floor detection to free pieces and correct collision detection field, should fix #1v0.1.1
Diffstat (limited to 'tris/core.go')
-rw-r--r-- | tris/core.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tris/core.go b/tris/core.go index 0b5afff..d0164e2 100644 --- a/tris/core.go +++ b/tris/core.go @@ -44,9 +44,9 @@ type Placement struct { Lock time.Time } -func (p Placement) Collide(f Field) bool { //TODO: Fix first piece collision bug +func (p Placement) Collide(f Field) bool { pf, ok := p.Field() - for x := 0; x < 9; x++ { + for x := 0; x < 10; x++ { for y := 0; y < 20; y++ { if f[y][x] && pf[y][x] { return true |