How colinlquom/minesweeper works
This is a browser-based Minesweeper game. The player clicks or right-clicks a cell in the DOM; the DOM controller delegates reveal and flag actions to game state, which uses a generated board to determine outcomes, and the controller renders the result. The graph includes the documented board setup, recursive reveals, win/loss handling, flags, and mine display. Edges are limited to relationships shown in excerpts or the README; unsampled styling and page wiring are not expanded.
Main entry points: game.js Game state · dom.js DOM controller · main.js App entry · board.js Board generation
Components 7
Game startup
- App entry
src/main.js
Board setup
- Board generation
src/board.js - Cell state
src/cell.js - Board settings
src/constants.js
Game logic
- Game state
src/game.js
Browser interface
- DOM controller
src/dom.js
Other components
- Player
Connections 11
- App entry → Game state: creates
src/main.js - App entry → DOM controller: creates
src/main.js - App entry → DOM controller: builds board
src/main.js - Game state → Board generation: creates
src/game.js - Board generation → Board settings: reads settings
src/board.js - Board generation → Cell state: creates cells
src/board.js - Player → DOM controller: clicks cells
src/dom.js - DOM controller → Game state: reveals cells
src/dom.js - DOM controller → Game state: toggles flags
src/dom.js - Game state → Game state: reveals neighbors
src/game.js - DOM controller → Game state: reads game state
src/dom.js