Reset when tile.HasMine triggered infinite loop

This commit is contained in:
Heemeryck 2020-07-06 18:33:55 +02:00
parent efc03de60f
commit 9d2f8cd469
1 changed files with 1 additions and 0 deletions

View File

@ -234,6 +234,7 @@ export default class Minesweeper extends React.Component<IMinesweeperProps, IMin
case GameStatus.Idle: // first click starting the game
while(tile.hasMine){
grid = this.initGrid(this.state.settings);
tile = grid[coord.row][coord.col];
}
this.setState({