Fixed a bug related to touching tiles

This commit is contained in:
Kai S. K. Engelbart 2019-04-12 17:29:03 +02:00
parent 7b9c9da893
commit 817d797c9c

View File

@ -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);
}