A simple minesweeper implementation in the python matplotlib library.
- left click: reveal tile
- right click: flag a tile
- at least 9 blank tiles at the first pick
- click on a number: reveal all surrounding tiles if number of flags equals the number of surrounding bombs
- time tracker: time is shown at the end when a player wins
- python >= 3.10
- and following packages:
matplotlib
numpy
random
from minesweeper import MW_Grid
MW_Grid.beginner()
from minesweeper import MW_Grid
MW_Grid.intermediate()
from minesweeper import MW_Grid
MW_Grid.hard()
from minesweeper import MW_Grid
MW_Grid(size=(40, 10), num_of_bombs=40)