fix: when left-click the flagged block, will not trigger explosion
This commit is contained in:
@@ -134,6 +134,14 @@ export class GamePlay {
|
|||||||
this.state.value.mineGenerated = true;
|
this.state.value.mineGenerated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (block.revealed)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (block.flagged) {
|
||||||
|
block.flagged = !block.flagged;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
block.revealed = true;
|
block.revealed = true;
|
||||||
if (block.mine) {
|
if (block.mine) {
|
||||||
this.onGameOver('lost');
|
this.onGameOver('lost');
|
||||||
|
|||||||
Reference in New Issue
Block a user