MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / gameOver

Function gameOver

assets/js/Minesweeper.js:189–201  ·  view source on GitHub ↗
(square)

Source from the content-addressed store, hash-verified

187
188 //game over
189 function gameOver(square) {
190 result.innerHTML = "BOOM! Game Over!";
191 isGameOver = true;
192
193 //show ALL the bombs
194 squares.forEach((square) => {
195 if (square.classList.contains("bomb")) {
196 square.innerHTML = "💣";
197 square.classList.remove("bomb");
198 square.classList.add("checked");
199 }
200 });
201 }
202
203 //check for win
204 function checkForWin() {

Callers 1

clickFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected