Skip to content

jennytalks/Minesweeper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minesweeper Codacy Badge

forthebadge forthebadge forthebadge

Instructions

  1. First click on the green button to download or click here
  2. Unzip the file like a boss.
  3. Click on index.html to open the file in your default browser
  4. Play !

How to 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.

Updates to come

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

Version v2.0

  • 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

Version v3.0 -> 🚧

  • 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

More information on the project

I used javascript and CSS without any framework. The minesweeper is rendered in a canvas object.

The project is build with:

  • Sketch.js that does the control and set-up.
  • Board.js for the minesweeper board model that is rendered through a lot of zones.
  • Zone.js defines the zones to be displayed in the board.
  • Explosion.js is used to create explosion when a mine explode.
  • Timer.js is for the timer used in the game.

About

A simple minesweeper in javascript

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 77.4%
  • CSS 12.7%
  • HTML 9.9%