UX: can't left click on flag
This commit is contained in:
parent
e8faf752c6
commit
72f43df475
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue