minesweeper
minesweeper copied to clipboard
A simplified game of minesweeper using vanilla JavaScript
For instance finding a bomb on bottom div needs a condition i
The code-block containing the line 152 is as follows: ``` if (currentId < 89) { const newId = squares[parseInt(currentId) +width].id //const newId = parseInt(currentId) +width ....refactor const newSquare = document.getElementById(newId)...

- Hanging brackets on the last line of app.js causes an error, simply removed to correct. - Simplify the checkSquare function by removing the "square" parameter as it isn't used...
https://github.com/kubowania/minesweeper/blob/bb3641fcb5c85918b8bd1594f397342e4ec223a3/app.js#L105 ``` const newSquare = document.getElementById(newId) click(newSquare) ``` it can come ones at the end of the function instead in every if block
Use right-click as additional flag creator created functions for edge-checking Simplified `checkSquare()` Removed `shuffledArray` since `Array.sort()` is an inline operation.