Skip to content

The Minesweeper game, implemented in Python

License

Notifications You must be signed in to change notification settings

EpocDotFr/minesweeper

Repository files navigation

Minesweeper

The Minesweeper game, implemented in Python.

Features

  • All the Minesweeper rules
  • State of the art graphics
  • Automatic game saving when quitting. If there's a saved game it is automatically loaded, too
  • Stats
  • Sound effects!

Prerequisites

Python 3. May eventually works with Python 2 (not tested).

Installation

Clone this repo, and then the usual pip install -r requirements.txt.

Usage

python run.py

Controls

  • ESC closes the game
  • F1 starts a new game
  • F2 displays stats
  • LMB clears an area
  • RMB place a mine marker on an area

How it works

This game is built on top of PyGame. I obviously can't explain how it works here, so you'll have to jump yourself in the source code. Start with the entry point, run.py.

Beside the game itself, I use PyInstaller to generate the executables. It packs up all the game and its assets in a single executable file so players just have to run it with nothing to install. This task is performed by the build_* scripts to be run in the corresponding OS.

Credits

End words

If you have questions or problems, you can submit an issue.

You can also submit pull requests. It's open-source man!