UX: can't left click on flag
This commit is contained in:
parent
b45a7e59d9
commit
b4174cd5bc
|
@ -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