Minesweeper

Another version of Minesweeper. This one is written in Rust for the WASM-4 fantasy console.

Source code is available on GitHub.

Controls

  • Arrow keys: Move cursor
  • X: Uncover a tile, or "chord" when the tile is already uncovered.
  • Z: Flag a tile

How to Play

The goal of Minesweeper is to uncover every tile that isn't a mine. Some tiles will reveal a number, which indicates the number of mines around that tile. Flagging a tile makes it impossible to accidentally uncover that tile until that flag is removed.

This implementation supports chording. When a tile's number is equal to the number of flags around it, "uncovering" the tile again will uncover every adjacent unflagged tile. If you've placed a flag on the wrong tile this might reveal a mine! And contrary to its namesake only one button is required to "chord."

The game has two difficulty settings:

  • Normal: 9 x 9 with 10 mines
  • Difficult: 15 x 12 with 25 mines

Implementation

Board generation is as random as the code will allow. This brings it more in line with Microsoft Minesweeper that came bundled with older versions of Windows up to and including Windows XP.

This does not use a no-guess generation algorithm, or for that matter implement any sort of solver to make that possible. It also doesn't guarantee that the first interaction is safe. That first uncovered tile might be a mine!

Published 21 days ago
StatusReleased
PlatformsHTML5
AuthorUbersmake
GenrePuzzle
TagsMinesweeper, No AI
ContentNo generative AI was used

Leave a comment

Log in with itch.io to leave a comment.