From 85ca0b0f861b021c185f714dfc2b203fcc997236 Mon Sep 17 00:00:00 2001 From: Sacha Ligthert Date: Wed, 6 Dec 2023 19:25:16 +0100 Subject: [PATCH] Better method comparing Position's. --- trash.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trash.go b/trash.go index 81e4d1a..2b7cf79 100644 --- a/trash.go +++ b/trash.go @@ -9,7 +9,7 @@ func (game *Game) drawTrash() { func (game *Game) onTrash(pos Position) bool { var found bool for _, t := range game.trash { - if t.x == pos.x && t.y == pos.y { + if t == pos { found = true } }