This project is a simple minesweeper game with an automatic solver, which computes a probability distribution of mines.
Thanks to GitHub Pages, here it is https://josef37.github.io/minesweeper/built/
Open deploy/index.html in your preferred browser
- Good old
npm install - Build (with local browserify):
npm run build
- In
bundle.jschangelet gameboard = new gameboard_1.Gameboard(width, height, totalNumberOfMines, isSaveFirstAction=true). - Left-click on an unrevealed cell to reveal it.
- Right-click on an unrevealed cell to flag it (and block revealing).
- Left-click on a revealed cell, with mine count and number of flags matching, to reveal all adjacent cells.
- Press
Pto display the probability distribution of mines. - Press
Sto automatically do the next action the solver suggests. - Press
Tto test 100 rounds of the solver (result in console)
At commit 9d06109 (prioritizing corner cells)
| Wins | Rounds | Rate |
|---|---|---|
| 389 | 1000 | 38.9% |
| 385 | 1000 | 38.5% |
| 376 | 1000 | 37.6% |
| 401 | 1000 | 40.1% |
| 400 | 1000 | 40% |
| 3823 | 10000 | 38.2% |
| 3909 | 10000 | 39.1% |