Skip to content

Commit 69549f5

Browse files
refactor 529
1 parent bb343cc commit 69549f5

File tree

1 file changed

+2
-0
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+2
-0
lines changed

src/main/java/com/fishercoder/solutions/_529.java

+2
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ public char[][] updateBoard(char[][] board, int[] click) {
103103
} else {
104104
/**There is no mines around this cell, so update it to be 'B'*/
105105
board[currRow][currCol] = 'B';
106+
107+
/**then we'll also check all of its four surrounding cells, if it's 'E'. we'll also update it to be 'B' and offer it into the queue*/
106108
for (int i = -1; i < 2; i++) {
107109
for (int j = -1; j < 2; j++) {
108110
if (i == 0 && j == 0) {

0 commit comments

Comments
 (0)