How alinaline982/no.chess works
Chess vs Stockfish is a browser chess game: the player configures a game, makes legal moves, and receives Stockfish replies and evaluation, all on-device. The app also supports saved settings and resumable games, move history, undo, promotion, and engine-strength controls. The source excerpts show app.js coordinating the rules library and engine worker; the README documents the game capabilities and the service worker’s multithreading role. index.html and pieces/ are present in the tree, but their contents were not sampled, so UI links are limited to the app’s observed DOM interaction.
Main entry points: app.js Game State · index.html Game Interface · stockfish-19.js Stockfish Worker · coi-serviceworker.js COI Service Worker
Components 20
Chess Gameplay
- Game Interface
index.html - Board and Pieces
app.js - Move Input
app.js - Game State
app.js - Chess Rules
- Move History
app.js - Promotion Choice
app.js - Game Flow and Undo
app.js
Engine Analysis
- Stockfish Worker
engine/stockfish-19.js - Stockfish WebAssembly
engine/stockfish-19.wasm - Engine Commands and Results
app.js - Position Evaluation
app.js
Settings and State
- Game Settings
index.html - Settings and Engine Options
app.js - Saved Settings and Game
app.js - Browser Local Storage
Browser Runtime
- COI Service Worker
coi-serviceworker.js
Other components
- Player
- Browser
- Resource Fetch
Connections 24
- Player → Game Interface: uses
- Game Interface → Move Input: accepts moves
app.js - Game Interface → Settings and Engine Options: sets options
app.js - Move Input → Game State: updates position
app.js - Move Input → Chess Rules: requests legal moves
app.js - Game Flow and Undo → Game State: starts or undoes
app.js - Game State → Chess Rules: applies moves
app.js - Game State → Board and Pieces: renders position
app.js - Game State → Move History: supplies moves
app.js - Move Input → Promotion Choice: offers promotion
app.js - Promotion Choice → Game State: completes move
app.js - Game State → Engine Commands and Results: requests reply
app.js - Engine Commands and Results → Stockfish Worker: sends UCI commands
app.js - Stockfish Worker → Engine Commands and Results: returns best move
app.js - Engine Commands and Results → Game State: applies reply
app.js - Engine Commands and Results → Position Evaluation: parses scores
app.js - Position Evaluation → Game Interface: updates readout
app.js - Game Settings → Settings and Engine Options: provides choices
app.js - Settings and Engine Options → Engine Commands and Results: configures engine
README.md - Settings and Engine Options → Saved Settings and Game: saves options
app.js - Game State → Saved Settings and Game: saves game
app.js - Saved Settings and Game → Browser Local Storage: reads and writes
app.js - Browser → COI Service Worker: registers
coi-serviceworker.js - COI Service Worker → Resource Fetch: fetches resources
coi-serviceworker.js