# minesweeper **Repository Path**: aax/minesweeper ## Basic Information - **Project Name**: minesweeper - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-07-24 - **Last Updated**: 2025-07-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Minesweeper Game A classic Minesweeper game implemented with React. ## Features - Classic Minesweeper gameplay - Three difficulty levels (Easy, Medium, Hard) - Timer to track game duration - Flagging mines - Reveal adjacent cells automatically when clicking on empty cells - Win/lose detection - Responsive design ## Tech Stack - React (with Hooks) - CSS Modules for styling - Vite as build tool ## Getting Started 1. Clone the repository 2. Install dependencies: `npm install` 3. Start the development server: `npm run dev` 4. Build for production: `npm run build` ## Project Structure ``` src/ ├── components/ # Reusable UI components │ ├── Cell.jsx # Individual cell component │ └── Board.jsx # Game board component ├── hooks/ # Custom React hooks │ └── useGame.js # Game logic hook ├── App.jsx # Main app component ├── main.jsx # Entry point └── index.css # Global styles ``` ## Game Rules 1. The game board consists of a grid of cells. 2. Some cells contain hidden mines. 3. Clicking on a cell reveals its content: - If it's a mine, the game ends. - If it's a number, that number indicates how many mines are adjacent to that cell. - If it's empty, all adjacent empty cells are revealed automatically. 4. Right-click (or long press on mobile) to flag a cell as a suspected mine. 5. The game is won when all non-mine cells are revealed. ## Development Plan 1. Setup project with Vite and React 2. Implement game logic (board generation, mine placement, cell revealing) 3. Create UI components (board, cells, controls) 4. Add game state management 5. Implement timer and mine counter 6. Add difficulty levels 7. Polish UI and add animations 8. Testing and optimization