Fix initial bomb moving adjacency logic
This commit is contained in:
parent
7e536cf644
commit
d19f9899cf
@ -122,14 +122,14 @@ public class Controller {
|
|||||||
int rowMovedTo = chosenColumnAndRow[1];
|
int rowMovedTo = chosenColumnAndRow[1];
|
||||||
wrapper.atColumn(column).atRow(row).switchBomb(columnMovedTo, rowMovedTo);
|
wrapper.atColumn(column).atRow(row).switchBomb(columnMovedTo, rowMovedTo);
|
||||||
recursiveExpandTiles(column, row);
|
recursiveExpandTiles(column, row);
|
||||||
isFirstClick = false;
|
clicked = (Button) getNodeByRowColumnIndex(row, column);
|
||||||
}
|
}
|
||||||
|
isFirstClick = false;
|
||||||
int adjacentBombs = wrapper.adjacentBombCount();
|
int adjacentBombs = wrapper.adjacentBombCount();
|
||||||
setAdjacentCount(clicked, adjacentBombs);
|
setAdjacentCount(clicked, adjacentBombs);
|
||||||
if (adjacentBombs == 0) {
|
if (adjacentBombs == 0) {
|
||||||
recursiveExpandTiles(column, row);
|
recursiveExpandTiles(column, row);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void recursiveExpandTiles(int column, int row) {
|
private void recursiveExpandTiles(int column, int row) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user