소스 검색

Better method comparing Position's.

Sacha Ligthert 2 년 전
부모
커밋
85ca0b0f86
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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
 		}
 	}