Fix moving mine to wrong square
This commit is contained in:
parent
7d280f2604
commit
a167922c00
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "minesweeper",
|
||||
"version": "0.0.26",
|
||||
"version": "0.0.27",
|
||||
"description": "Just Minesweeper!",
|
||||
"author": "Felix W. Dekker",
|
||||
"browser": "dist/bundle.js",
|
||||
|
|
|
@ -702,7 +702,7 @@ class Field {
|
|||
if (!this.started && square.hasMine) {
|
||||
square.hasMine = false;
|
||||
const target = this.squareList
|
||||
.filter(it => it.hasMine && it !== square)[0];
|
||||
.filter(it => !it.hasMine && it !== square)[0];
|
||||
target.hasMine = true;
|
||||
}
|
||||
this.started = true;
|
||||
|
|
Loading…
Reference in New Issue