The classic Minesweeper game implemented with Javascript, React and CSS.

Rules, Controls and Tips

  • Left clicking on a closed square opens it, possibly revealing a number, a mine or an empty square.
  • The number in a square denotes the number of mines that are in the neighboring squares (horizontal, vertical and diagonal neighbors). An empty square has no mines neighboring it (hence its neighbors are automatically opened).
  • Right clicking a square marks it with a flag (used to denote a mine). Left clicking on a flagged square will not open it. Double clicking a flagged square will remove the flag.
  • Exposing a mine detonates all unflagged mines. As a side effect, you also lose the game (in addition to dying). Thankfully, a click of a button reincarnates you to fight another day.
  • Double clicking on a numbered square, which has an equal number of neighboring flagged squares, will open all the unflagged neighboring closed squares. This speeds up the process considerably.
  • If a square has been incorrectly flagged, it will be highlighted with an  x  at the end of the game.
  • The first square to be opened in a game will never be a mine.

All the best!

The source code for the game is available under my github page here.


Comments

comments powered by Disqus