Minesweeper with JavaScript

This a is a new version of the famous Minesweeper game. For those who are not familiar with this game, the principle is to uncover all the squares that do not contain a mine (mines are hidden under some squares).

To uncover a square, just click on it. If the square actually contains a mine, you lose. Otherwise the number of mines surounding the square (including diagonals) shows up in the square to help you guess where to click next. Note that you cannot lose on your first click.

To mark a square as containing a mine (once you figured out that it does contain a mine), press TAB (don't hold it, just press it and release it) then click on the square. In case you pressed TAB but did not mean to then pressing it again will cancel it. In case you are unsure about how many times you pressed TAB, just click on any already uncovered square for reinitialization (i.e. as if you had not typed TAB at all). Note that you must type TAB before clicking on each square you want to mark.

At any time during the game you can see in the text box in the upper left corner of the window how many mines are remaining that you did not mark.

To start the game, just click one of the buttons in the left part of this page.

Have fun!

Legend :

Notes :