Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mrglaster/js-minesweeper-game

Minesweeper made with pure JS, HTML & CSS
https://github.com/mrglaster/js-minesweeper-game

css html html5 javascript javascript-game js onepageapp purejs

Last synced: about 1 month ago
JSON representation

Minesweeper made with pure JS, HTML & CSS

Awesome Lists containing this project

README

        

## JavaScript Minesweeper game
Minesweeper developed with pure JavaScript.

Minesweeper is a puzzle video game.In the game, mines (that resemble naval mines in the classic theme) are scattered throughout a board, which is divided into cells. Cells have three states: unopened, opened and flagged. An unopened cell is blank and clickable, while an opened cell is exposed. Flagged cells are those marked by the player to indicate a potential mine location.

A player selects a cell to open it. If a player opens a mined cell, the game ends. Otherwise, the opened cell displays either a number, indicating the number of mines diagonally and/or adjacent to it, or a blank tile (or "0"), and all adjacent non-mined cells will automatically be opened. Players can also flag a cell, visualised by a flag being put on the location, to denote that they believe a mine to be in that place. Flagged cells are still considered unopened, and a player can click on them to open them. In some versions of the game when the number of adjacent mines is equal to the number of adjacent flagged cells, all adjacent non-flagged unopened cells will be opened, a process known as chording.

## Screenshots

![alt text](https://github.com/mrglaster/js-minesweeper-game/blob/main/screenshots/1.jpg?raw=True) ![alt text](https://github.com/mrglaster/js-minesweeper-game/blob/main/screenshots/2.jpg?raw=True)