Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 1.26 KB

README.md

File metadata and controls

22 lines (17 loc) · 1.26 KB

MineSweeper Game 💣

This is a classic implementation of the MineSweeper game built using Java. The game features a grid of cells, each of which can either contain a mine or be empty. The goal is to uncover all the non-mine cells without triggering any mines. Players can flag 🚩 cells they suspect contain mines and reveal adjacent cells when a mine-free cell is uncovered.


Features

  • Interactive Grid: A grid of cells where each cell can either be revealed or flagged.
  • Mines: Randomly placed mines that the player must avoid.
  • Flagging: Right-click to place or remove flags on cells.
  • Flood Fill: Reveals neighboring cells when a cell with no adjacent mines is clicked.
  • Timer: Tracks the time spent on the game.
  • Winning Condition: The game is won when all non-mine cells are revealed.
  • Game Over: The game ends when a mine is clicked or the game is won

How to Play

  • Left Click: Reveal the cell.
  • Right Click: Flag the cell (or remove the flag if already placed).
  • The goal is to uncover all the cells that do not contain a mine.
  • The game ends when either all non-mine cells are revealed (you win), or you click on a mine (you lose).
MinesweeperGame.mp4