A React-based implementation of a number-finding game inspired by Minesweeper. Built with React and Vite.
Mines is a puzzle game where players must find all the numbers on the board while avoiding zeros. The game features:
- Customizable board size
- Dynamic score tracking
- Random number generation
- Immediate feedback on game progress
- Win/lose conditions
- Node.js (latest LTS version recommended)
- npm or yarn package manager
- Clone the repository
- Install dependencies:
npm install- Start the development server:
npm run dev- Enter a number in the input field to set the board size (n×n)
- Click on cells to reveal their values
- Avoid cells with value 0 (they end the game)
- Try to find all non-zero numbers
- Win by accumulating the sum of all numbers on the board
- Each cell contains a random number between 0 and the board size
- Clicking a cell with 0 ends the game
- The game is won when you find all non-zero numbers
- You can restart the game at any time after winning or losing
src/
├── components/
│ ├── OptionButton.jsx - Individual cell component
│ └── Row.jsx - Row component for the game board
├── App.jsx - Main game logic and layout
├── App.css - Styling
└── main.jsx - Entry point
- React 19
- Vite
- CSS3
- ES6+ JavaScript
npm run dev- Start development servernpm run build- Build for productionnpm run lint- Run ESLintnpm run preview- Preview production build
Feel free to fork the project and submit pull requests with improvements.
This project is open source and available under the MIT License.