Project
Mattsweeper
Minesweeper, rebuilt from scratch in React, to learn React.
What it does
Beginner, Intermediate and Expert boards, or any width, height and number of mines. Flag the mines, and chord: click a number whose flags are all placed to open every tile around it. A seven-segment display counts the mines left and the seconds.
What I built
- The game rules in plain JavaScript, kept apart from the React components: board layout, neighbour checks, and an iterative flood fill that opens empty areas.
- Chording, including what happens when a flag is wrong.
- React state for the board, flags, counter and timer.
Stack
- React
- JavaScript
- Vite
Built
February to August 2024.