This is a replica of the original Minesweeper puzzle game, but instead of mines it is trollfaces.
The code is somewhat generic. You can play around with the variables in the SetupCanvas()-function:
colsis the number of columnsrowsis the number of rows.cellSizeis the size of a cell.numTrollCellsis the number of trolls hiding.
If you do not want to test the code there is a live version on my webpage.
- Make the user deside the number of cells and trolls.
Inspired by the coding challenge #71 made by @TheCodingTrain