Parcourir la source

Better method comparing Position's.

Sacha Ligthert il y a 2 ans
Parent
commit
85ca0b0f86
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      trash.go

+ 1 - 1
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
 		}
 	}