UX: can't left click on flag

This commit is contained in:
Pieter Heemeryck 2020-07-06 18:10:21 +02:00
parent e8faf752c6
commit 72f43df475
1 changed files with 1 additions and 5 deletions

View File

@ -246,7 +246,7 @@ export default class Minesweeper extends React.Component<IMinesweeperProps, IMin
return; return;
} }
if(tile.fieldType === FieldType.Number || tile.fieldType === FieldType.Empty){ if(tile.fieldType === FieldType.Number || tile.fieldType === FieldType.Empty || tile.fieldType === FieldType.Flag){
return; return;
} }
@ -256,10 +256,6 @@ export default class Minesweeper extends React.Component<IMinesweeperProps, IMin
return; return;
} }
if(tile.fieldType === FieldType.Flag){
nrMinesLeft++;
}
let closeMines = this.getSurroundingMines(grid, coord); let closeMines = this.getSurroundingMines(grid, coord);
if(closeMines > 0){ if(closeMines > 0){
tile.closeMines = closeMines; tile.closeMines = closeMines;