Implementation of Minesweeper in python using module pygame.
- Python 3.7.7 or greater: Visit python's website.
- Pygame: Use
pip install pygame
or visit pygame's website.
You can just download and run the installer: "Minesweeper_by_Alphabet.exe")
- Download the repository.
- Make sure your software meets the requirements.
- Open the terminal.
- Run minesweeper .py with python 3.7.7 or greater.
Read more in depth about Minesweeper here.
Player has to reveal all the cells excluding the mines.
The game ends if player either:
- clicks on the mine,
- reveals all the cells that are not mines,
- reveals all the mines using special input.
Control panel is located on the right side of the screen.
To enter / exit settings' menu, player has to click on the settings wheel.
Inside settings' menu, player can:
- turn music on / off,
- select the size of the grid (Default: 9 x 9).
-
Left mouse button (LMB)
- Main input, used to reveal the clicked cell or to enter settings' menu.
-
Right mouse button (RMB)
- Used to flag the clicked cell (if the user thinks it might be a mine).
-
Enter / Return
- Used to reveal all the mines.
-
Spacebar
- Used to restart the game.
In the making of Minesweeper I used the following sources:
All the images used in the project are from flaticon.
All the sounds used in the project are from freesound.