Better method comparing Position's.
This commit is contained in:
parent
adefe7bd20
commit
85ca0b0f86
2
trash.go
2
trash.go
@ -9,7 +9,7 @@ func (game *Game) drawTrash() {
|
|||||||
func (game *Game) onTrash(pos Position) bool {
|
func (game *Game) onTrash(pos Position) bool {
|
||||||
var found bool
|
var found bool
|
||||||
for _, t := range game.trash {
|
for _, t := range game.trash {
|
||||||
if t.x == pos.x && t.y == pos.y {
|
if t == pos {
|
||||||
found = true
|
found = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user