This is a variant of Minesweeper. The player can enter a number between 1 and 100 to generate a map with randomly placed mines, and then click each square to reveal how many mines are around it. To flag a square as a potential mine, the player can click/press and hold. To win, all safe squares must be clicked. This game includes "memory-mode", which causes each number to disappear after 2 seconds for an extra challenge.
This is my final project for Web Development 1 at Code Louisville. It began as a side project to practice event listeners, and turned out to be more fun than my original idea.
I started this on codepen.io, and then started my repository when I decided to make it my project. Here is a link to the original codepen.
- Utilizes objects and 2D arrays to store and manipulate game information
- Grid and Flexbox for responsive layout
- Dynamically generates HTML to display each game, without any framework.
- Uses event listeners and setTimeout to trigger different functions depending on how long a square is pressed.
The CSS animation code is from a tutorial online, copied and pasted in order to be studied and reworked. It is from Jamie Juviler's tutorial
The icons are from favicon.io