Welcome to Minesweeper! This repository contains a classic implementation of the popular Minesweeper game.
Minesweeper is a single-player logic game where the objective is to clear a grid of hidden mines without detonating any. The grid contains numbered cells that indicate the number of mines in the adjacent cells. The challenge is to deduce the locations of all mines based on these numbers and clear the board safely.
To run Minesweeper locally, follow these steps:
-
Clone the Repository:
git clone https://github.com/awang343/minesweeper.git
-
Navigate to the Project Directory:
cd minesweeper
-
Run the project:
java Main.java
- Start a New Game: Select the desired difficulty level.
- Play: Click on cells to reveal them. Numbers indicate the count of adjacent mines. Use this information to uncover safe cells and avoid mines.
- Flags: Mark suspected mines with flags to avoid accidental clicks.
- End Game: The game ends when you either clear all safe cells or hit a mine. Your score will be recorded based on your performance.