diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-11-08 08:04:49 +0100 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-11-08 08:04:49 +0100 |
| commit | f47491b3a89ba769760bb555ea72f1416cb0cb08 (patch) | |
| tree | d99a46500a83bf8eb4b7fb3bcc5c1e698fbfed64 /utils/minesweeper/script.js | |
| parent | d656de03fc22e5b39117087ef4e95cfc9f239708 (diff) | |
| download | cacharle.xyz-f47491b3a89ba769760bb555ea72f1416cb0cb08.tar.gz cacharle.xyz-f47491b3a89ba769760bb555ea72f1416cb0cb08.tar.bz2 cacharle.xyz-f47491b3a89ba769760bb555ea72f1416cb0cb08.zip | |
Added flash message remove on new game, moving info bar to the top
Diffstat (limited to 'utils/minesweeper/script.js')
| -rw-r--r-- | utils/minesweeper/script.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/minesweeper/script.js b/utils/minesweeper/script.js index 3bc23f4..d05a9af 100644 --- a/utils/minesweeper/script.js +++ b/utils/minesweeper/script.js @@ -114,8 +114,8 @@ function initGrid() { return } if (mines[i][j] === -1) { - endFlashMessage(false) toggleRunning() + endFlashMessage(false) } else { floodFill(i, j) @@ -127,8 +127,8 @@ function initGrid() { } } if (won) { - endFlashMessage(true) toggleRunning() + endFlashMessage(true) } } }) @@ -156,6 +156,7 @@ for (input of document.querySelectorAll("#minesweeper-settings input")) { } function toggleRunning() { + flash_message_node.hidden = true; if (running) { clearInterval(interval) initGrid() |
