(square)
| 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() { |