Skip to content

The minesweeper is using the tile renderer in the Tile renderer repository.

Notifications You must be signed in to change notification settings

JustMakeItStudio/Minesweeper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Minesweeper Clone

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

Libraries used:

How it works:

  • 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.

Future updates:

  • Implement a menu system, starting screen, pause, failure and win screen.
  • Change the appearance, colors, fonts.
  • Add sounds.
  • Reduce the needed libraries.

Installation

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

Screen shots:

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.

image

image

Use this as you like

About

The minesweeper is using the tile renderer in the Tile renderer repository.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages