From a167922c0071982f9418b4b28776a6222ed5ff3c Mon Sep 17 00:00:00 2001 From: "Felix W. Dekker" Date: Thu, 30 Jul 2020 20:56:13 +0200 Subject: [PATCH] Fix moving mine to wrong square --- package.json | 2 +- src/main/js/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6142c23..061c7ef 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/main/js/index.js b/src/main/js/index.js index 1afbc56..c166eaa 100644 --- a/src/main/js/index.js +++ b/src/main/js/index.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;