Another version of Minesweeper. This one is written in Rust for the WASM-4 fantasy console.
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
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!
Build the cart by running:
cargo build --releaseGrab a binary for your platform of choice from the latest WASM-4 release. Copy it to the project and run it with:
bin/w4 run target/wasm32-unknown-unknown/release/minesweeper.wasmFor more info about setting up WASM-4, see the quickstart guide.
- Documentation: Learn more about WASM-4.
- Snake Tutorial: Learn how to build a complete game with a step-by-step tutorial.
- GitHub: Submit an issue or PR. Contributions are welcome!