How razercode-dev/hollow-chess works
Hollow Chess is a browser-based chess game. A player interacts with the board and controls; the JavaScript game logic uses Chess.js for chess state and rules, updates the interface, and supports promotion, move history, undo/redo, and saved games. The README identifies HTML, CSS, and Chess.js via CDN, while the sampled JavaScript shows localStorage persistence and piece and sound assets. The HTML and CSS were not sampled, so their detailed wiring is not represented.
Main entry points: main.js Game logic · index.html Board and controls · pieces Piece images · sound Move sounds
Components 14
Game interface
- Game page
index.html - Board and controls
index.html - Game status
js/main.js
Chess gameplay
- Game logic
js/main.js - Board interaction
js/main.js - Chess.js rules
- Promotion choice
js/main.js - Move history
js/main.js - Undo and redo
js/main.js
Game state and assets
- Saved game
js/main.js - Browser storage
- Piece images
assets/pieces - Move sounds
assets/sound
Other components
- Player
Connections 14
- Player → Board and controls: interacts with
README.md - Board and controls → Board interaction: handles input
js/main.js - Board interaction → Chess.js rules: checks legal moves
js/main.js - Game logic → Chess.js rules: creates game
js/main.js - Game logic → Board interaction: registers handlers
js/main.js - Game logic → Promotion choice: routes promotion
js/main.js - Game logic → Move history: renders moves
js/main.js - Game logic → Undo and redo: updates game
js/main.js - Game logic → Game status: updates status
js/main.js - Game logic → Saved game: loads and saves
js/main.js - Saved game → Browser storage: reads and writes
js/main.js - Game logic → Piece images: loads images
js/main.js - Game logic → Move sounds: loads audio
js/main.js - Game page → Game logic: uses
README.md