Fix moving mine to wrong square

This commit is contained in:
Florine W. Dekker 2020-07-30 20:56:13 +02:00
parent 7d280f2604
commit a167922c00
Signed by: FWDekker
GPG Key ID: B1B567AF58D6EE0F
2 changed files with 2 additions and 2 deletions

View File

@ -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",

View File

@ -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;