Skip to content

A simple Minesweeper implementation in the python matplotlib library.

License

Notifications You must be signed in to change notification settings

moritzleucke/Matplotlib-Minesweeper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Matplotlib-Minesweeper

A simple minesweeper implementation in the python matplotlib library.

Features and gameplay

  • 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

Prerequisites

  • python >= 3.10
  • and following packages:
    • matplotlib
    • numpy
    • random

Gallery

Beginner game:

from minesweeper import MW_Grid
MW_Grid.beginner()

beginner option

Intermediate game:

from minesweeper import MW_Grid
MW_Grid.intermediate()

beginner option

Hard game:

from minesweeper import MW_Grid
MW_Grid.hard()

beginner option

Custom game:

from minesweeper import MW_Grid
MW_Grid(size=(40, 10), num_of_bombs=40)

beginner option

Some inspiration

About

A simple Minesweeper implementation in the python matplotlib library.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages