Minesweeper is a classic single-player puzzle game where the player must clear a grid containing hidden mines without detonating any of them. This project implements Minesweeper using React and Vite, providing an interactive and enjoyable gaming experience.
- Interactive grid-based gameplay.
- Timer to track the duration of the game.
- Flags counter to keep track of the remaining flags.
- Reset button to start a new game.
- Responsive design for various screen sizes.
- Click on a square to reveal its content.
- Numbers indicate how many mines are adjacent to the clicked square.
- Right-click to place a flag on a square suspected to contain a mine.
- The game is won when all non-mine squares are revealed and flagged correctly.
- The game is lost if a mine square is revealed.
-
Clone this repository to your local machine:
git clone https://github.com/your-username/minesweeper-react.git
-
Navigate to the project directory:
cd minesweeper-react -
Install dependencies using npm or yarn:
npm install # or yarn install -
Start the development server:
npm run dev # or yarn dev -
Open your browser and visit http://localhost:3000 to play the game.
Play the live demo here.
This project is licensed under the MIT License. See the LICENSE file for more details.