From 817d797c9c50110a26a4aa6feb49369c3a5c1bbe Mon Sep 17 00:00:00 2001 From: CyB3RC0nN0R Date: Fri, 12 Apr 2019 17:29:03 +0200 Subject: [PATCH] Fixed a bug related to touching tiles --- src/dev/kske/minesweeper/Board.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dev/kske/minesweeper/Board.java b/src/dev/kske/minesweeper/Board.java index 2a45c58..18355bb 100644 --- a/src/dev/kske/minesweeper/Board.java +++ b/src/dev/kske/minesweeper/Board.java @@ -214,7 +214,7 @@ public class Board extends JPanel { else if (tile.getSurroundingMines() == 0) for (int i = Math.max(0, n - 1); i < Math.min(n + 2, board.length); i++) for (int j = Math.max(0, m - 1); j < Math.min(m + 2, board[i].length); j++) - if (i != n || j != m && board[i][j].getSurroundingMines() == 0) touchTile(i, j); + if (i != n || j != m) touchTile(i, j); repaintTile(n, m); }