Navigation

779 days ago ยท Updated 456 days ago


Description

MineSweep is a Minesweeper clone written in JavaScript and Svelte.

If you've never played Minesweeper, it is a single-player puzzle game where the objective is to clear a board containing hidden "mines" without detonating any of them, with help from clues about the number of neighboring mines in each field.

Controls

- LEFT CLICK on unrevealed tile - reveal tile

- RIGHT CLICK - flag tile

- LEFT CLICK on revealed tile with mine count matching number of adjacent flags - reveal all surrounding tiles

- LEFT CLICK on revealed tile with same number of flags as neighboring mines - flag all surrounding tiles

I decided to implement flag chording into my version of the game, which allows you to automatically flag all the surrounding tiles of a tile that has been revealed and has the same number of flags as the number of neighboring mines.

Example

As shown below, left-clicking on the tile with 1 will flag the single unrevealed tile:

9 minesweeper tiles, hovering over a tile with 1 in the middle and unrevealed tile in bottom left

becomes:

9 minesweeper tiles, hovering over a tile with 1 in the middle and a now flagged tile in bottom left

Future Plans

  • Add click counter
  • Add detailed stats
  • Add rectangular board sizes

alec ames copyright 2023