How smashinu/chessbot works
ChessBotMVP is a browser chess game: the player makes a move on an interactive board, the app validates and records it, Stockfish computes a reply, and the app updates the board and reports game outcomes. The README also documents a per-side timer, difficulty scaling, promotion, invalid-move feedback, and sound effects. The sampled game component implements promotion, difficulty, outcomes, and move feedback; timer behavior is not visible in the sampled source, so its wiring is omitted.
Main entry points: chessBotMVP.jsx Chess game UI · index.js App entry · App.js App shell · stockfish.js Stockfish runtime
Components 14
Game interface
- App entry
src/index.js - App shell
src/App.js - Chess game UI
src/chessBotMVP.jsx - Interactive board
- Game timer
src/chessBotMVP.jsx
Chess gameplay
- Chess rules
- Game state
src/chessBotMVP.jsx - Game outcomes
src/chessBotMVP.jsx - Difficulty scaling
src/chessBotMVP.jsx
Engine and audio
- Stockfish worker
src/engine/stockfishWorker.js - Stockfish runtime
public/stockfish.js - Engine WASM
public/stockfish.wasm - Sound effects
src/sounds.jsx
Other components
- Player
Connections 15
- Player → App entry: opens game
- App entry → App shell: renders
- App shell → Chess game UI: renders
- Chess game UI → Interactive board: renders board
- Interactive board → Chess game UI: reports moves
- Chess game UI → Chess rules: validates moves
- Chess game UI → Game state: updates state
- Chess game UI → Game outcomes: checks outcomes
- Game outcomes → Chess game UI: reports result
- Chess game UI → Difficulty scaling: updates level
- Chess game UI → Stockfish worker: starts worker
- Chess game UI → Stockfish runtime: sends position
- Stockfish runtime → Engine WASM: uses engine
- Chess game UI → Game state: applies reply
- Chess game UI → Sound effects: plays feedback