- First click on the green button to download or click here
- Unzip the file like a boss.
- Click on
index.htmlto open the file in your default browser - Play !
Here is a quick guide on how to play the game:
- Right click on a gray square to unveil it.
- The number on the unveiled square reveals the number of mine directly arounf
- Left click on a gray square to flag it (a red flag will appear).
- The goal is to unveil all of the case that does not contain any mines and flag all of the squares that containes a mine.
- the number of mines is at the top of the canvas.
Here are some stuff that I might add, I have scheduled them for the next version.
Version v1.0 -> Released !!
- Show the Minesweeper Board
- Make the Board reactive on clicks
- Have Flags on unclick case when right click
- Uncover case and all empty ones surrounding on left click (flagged ones remains hidden)
- Have Mine hidden randomly in the Board
- Uncover all mines when one is clicked
- A Counter for the time
- Display the amount of mine to find in the game
- More options on board object creation
- Have a autofit function to match the size of the board and the size of the screen
- Have the mine explode when you click on it
- A winning feature (with a reward for beating the game)
- Have the number of mine to find
- Document the "How to Play" section
- Clean up of V1 code
- A button to start the game (and the Timer)
- A button to restart the game (and the Timer)
- A Selector to choose the board size
- Page design enhancement
- Make it portable (for phones, or in an App)
- Reduce cyclomatic complexity
- Have a saving feature (using cookies?)
- Clean up of V2 code
- Refactoring the project folder's structure
I used javascript and CSS without any framework. The minesweeper is rendered in a canvas object.
The project is build with:
Sketch.jsthat does the control and set-up.Board.jsfor the minesweeper board model that is rendered through a lot of zones.Zone.jsdefines the zones to be displayed in the board.Explosion.jsis used to create explosion when a mine explode.Timer.jsis for the timer used in the game.