How heidischieb/eecs581-project1-minesweeper works
This is a browser-based Minesweeper game. A player chooses a mine count, starts a round, then reveals or flags cells; the interface displays the updated board, remaining-mine count, and win/loss state. The UI delegates input validation and command dispatch to the input handler, which invokes game rules and board operations. The README documents first-reveal safety, capped flags, flood reveal, and reset behavior. The graph follows shown calls and documented behavior; no backend or persistent store is described.
Main entry points: UserInterface.tsx Game screen · types.ts Game contracts · inputHandler.ts Input validation · SetupControls.tsx Setup controls
Components 9
Game interface
- React mount
src/main.tsx - Game screen
src/UserInterface.tsx - Setup controls
src/components/SetupControls.tsx - Board controls
src/components/GameBoard.tsx
Game commands
- Input validation
src/inputHandler.ts - Game rules
src/gameLogic.ts
Board operations
- Board operations
src/boardManager.ts
Shared contracts
- Game contracts
src/types.ts
Other components
- Player
Connections 18
- Player → Setup controls: chooses mines
README.md - Player → Board controls: plays cells
README.md - React mount → Game screen: mounts
src/main.tsx - Game screen → Setup controls: renders
src/UserInterface.tsx - Game screen → Board controls: renders
src/UserInterface.tsx - Setup controls → Game screen: submits count
src/components/SetupControls.tsx - Board controls → Game screen: sends actions
src/components/GameBoard.tsx - Game screen → Input validation: dispatches actions
src/UserInterface.tsx - Input validation → Game rules: invokes commands
src/inputHandler.ts - Game rules → Board operations: uses board operations
src/gameLogic.ts - Game screen → Board operations: creates preview
src/UserInterface.tsx - Input validation → Board operations: validates positions
src/inputHandler.ts - Game screen → Game contracts: uses types
src/UserInterface.tsx - Setup controls → Game contracts: uses limits
src/components/SetupControls.tsx - Board controls → Game contracts: uses board types
src/components/GameBoard.tsx - Input validation → Game contracts: uses action types
src/inputHandler.ts - Game rules → Game contracts: uses state types
src/gameLogic.ts - Board operations → Game contracts: uses board types
src/boardManager.ts