mirror of
https://github.com/pnp/sp-dev-fx-webparts.git
synced 2025-02-06 04:58:39 +00:00
Reset when tile.HasMine triggered infinite loop
This commit is contained in:
parent
efc03de60f
commit
9d2f8cd469
@ -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({
|
||||
|
Loading…
x
Reference in New Issue
Block a user