Implementation of Minesweeper game and agent in Python 3.
Sample exported 20x20 Map
pyminesweeper
- MinesweeperMap
- Contains the functions to create the minesweeper grid and help connect to a frontend
- MinesweeperUI
- Contains terminal UI for playing the game and functions to create a customised game UI
pip install python-minesweeper
import pyminesweeper
game = pyminesweeper.MinesweeperUI()
game.run()
- board representation
- board generation
- modifiable size
- human playable
- first click always safe
- number of lives
- different modes
- detailed instructions
- decouple base and ui to separate files
- refactor
- screenshots
- scoreboard
- formatted output
- export maps
- save progress
- load maps
- working agent
All kinds of contributions are very welcome.
Source: python-minesweeper