This project is a fully functional Minesweeper game built using React. It includes classic gameplay features, dynamic board generation, and responsive design.
The game is live and accessible at the following URL: minesweeper
- Dynamic board with adjustable difficulty levels:
- Easy: 8x8 grid with 10 mines
- Medium: 16x16 grid with 40 mines
- Hard: 30x16 grid with 99 mines
- Auto Clear: Clicking on an empty tile (with 0 adjacent bombs) reveals adjacent tiles recursively until all empty areas are cleared.
- Safe First Turn: The first click is always safe, ensuring no bombs are placed in the initially clicked tile.
- Clear game win/loss feedback.
- Responsive design for seamless play across devices.
- Dynamic Board Generation: Ensuring fair mine placement, avoiding mines on the first click, and balancing randomness.
- Recursive Logic for Auto Clear: Implementing efficient recursion to reveal all adjacent empty cells without causing infinite loops.
- State Management: Efficiently handling game state for revealed cells, and win/loss conditions.
- Responsive Design: Adapting the grid for different screen sizes required intricate CSS adjustments.
If more time were available, the following enhancements would be prioritized:
- Flagging System: Enable players to mark suspected mine locations.
- Timer and Leaderboard: Track game times and maintain high scores for competitive play.
- Custom Game Settings: Allow players to customize board size and mine density.
- Sound Effects and Animations: Enhance gameplay experience with audio and visual feedback.
- Accessibility Improvements: Make the game fully keyboard and screen-reader friendly.
- Players are familiar with Minesweeper rules, though a rules page is provided.
- The first click must always be safe.
- The game is primarily accessed on web browsers across desktop and mobile devices.
The project took approximately 25 hours to complete.
- The project offered a great opportunity to design and implement algorithm-driven UI components in React.
- The extra credit tasks challenged me to think about edge cases and improve game functionality.
Thank you for reviewing this project!