Fixed a bug related to touching tiles
This commit is contained in:
parent
7b9c9da893
commit
817d797c9c
@ -214,7 +214,7 @@ public class Board extends JPanel {
|
|||||||
else if (tile.getSurroundingMines() == 0)
|
else if (tile.getSurroundingMines() == 0)
|
||||||
for (int i = Math.max(0, n - 1); i < Math.min(n + 2, board.length); i++)
|
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++)
|
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);
|
repaintTile(n, m);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user