Build in Python 3. The aim is to recreate the legendary minesweeper game. This is a simpe clone. The tile rendering is given as a separate repository here:
https://github.com/JustMakeItStudio/Tile-renderer
- A tiled map is created using pygame.
- Each tile is an instance of a class called Tile.
- Every tile has 2 states, clicked, and not clicked, as well as, 2 further states, bomb, and not bomb.
- Any mouse event is used to change the state from not clicked to clicked.
- If it is a bomb then a pop up apears telling you, you died, using tkinter.
- Else all the connected tiles that are not near a bomb are changed to the clicked state and are now visible.
- Implement a menu system, starting screen, pause, failure and win screen.
- Change the appearance, colors, fonts.
- Add sounds.
- Reduce the needed libraries.
To run the code you need Python3, and the libraries above installed on your computer. To install a libray for python open the command prompt and follow the example bellow.
$ pip install pygame
To clone the repository, open the command prompt at the directory of choice and type:
$ git clone --recursive https://github.com/JustMakeItStudio/Minesweeper
The red colored tiles represent the bombs, while the blue tiles have a number inside them that indicates how many bombs are one tile away, finaly the black tiles have not been not clicked yet.
Use this as you like