Merge pull request #1373 from PieterHeemeryck/fix/minesweeper/flagLeftClick
This commit is contained in:
commit
efc03de60f
|
@ -246,7 +246,7 @@ export default class Minesweeper extends React.Component<IMinesweeperProps, IMin
|
|||
return;
|
||||
}
|
||||
|
||||
if(tile.fieldType === FieldType.Number || tile.fieldType === FieldType.Empty){
|
||||
if(tile.fieldType === FieldType.Number || tile.fieldType === FieldType.Empty || tile.fieldType === FieldType.Flag){
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -256,10 +256,6 @@ export default class Minesweeper extends React.Component<IMinesweeperProps, IMin
|
|||
return;
|
||||
}
|
||||
|
||||
if(tile.fieldType === FieldType.Flag){
|
||||
nrMinesLeft++;
|
||||
}
|
||||
|
||||
let closeMines = this.getSurroundingMines(grid, coord);
|
||||
if(closeMines > 0){
|
||||
tile.closeMines = closeMines;
|
||||
|
|
Loading…
Reference in New Issue