Skip to content

tsbranquinho/FP-proj2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Minesweeper - Second Project of Foundations of Programming (FP) 2022/2023

This project involves creating a Minesweeper game in Python, which can be played directly in the terminal. The goal of the game is to clear a minefield without detonating any mines, using clues that indicate the number of neighboring mines for each tile.

Game Description

The game takes place on a rectangular field with several tiles, some of which contain hidden mines. Each tile can be in one of three possible states: covered, cleared, or flagged.

  • Covered: The tile is hidden, and the player doesn't know whether it's safe or contains a mine.
  • Cleared: The player revealed the tile. If it's safe, it shows a number indicating the number of neighboring mines. If there are no mines around, neighboring tiles are automatically cleared.
  • Flagged: The player can flag a tile to indicate they believe a mine is there. Flagged tiles remain covered, and the player can later unflag or clear them.

Game Rules

  1. Clearing tiles: The player can clear a tile. If it contains a mine, the game ends. Otherwise, the number of neighboring mines is displayed.
  2. Flagging tiles: The player can flag a tile if they suspect it contains a mine. If the player flags all the mines correctly, they win the game.
  3. Neighboring tiles: Each turn, the player can clear or flag a tile. Tiles neighboring a cleared tile with a value of 0 are automatically cleared.
  4. Mine placement: Mines are placed randomly on the field after the player chooses their first tile to clear. The first tile cleared will never contain a mine or have any neighboring mines.

How to Play

Requirements

This game is developed in Python. To play, make sure you have Python installed on your computer.

About

FP Project 2 22/23

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages