This is the result of a 1 hour coding challenge to create the classic game Minesweeper using React, TypeScript, and Vite.
Minesweeper is a single-player puzzle game where the objective is to clear a rectangular board containing hidden "mines" without detonating any of them. You win by revealing all safe squares while avoiding the mines.
- Clone the repository
- Install dependencies:
npm install- Run the development server:
npm run dev- Left click to reveal a square
- Right click to flag a potential mine
- Numbers indicate how many mines are adjacent to that square
- Avoid clicking on mines!
- Classic Minesweeper gameplay
- Configurable board size and mine count
- First-click protection
- Timer and mine counter
- Victory and defeat conditions
- React 18
- TypeScript
- Vite
- ESLint for code quality
To build for production:
npm run buildTo preview the production build:
npm run preview