How rockkamal253-ns/wizards_chess works
Wizard’s Chess is a desktop 3D chess game: a player interacts with the Three.js board, game controls update the match, and the integrated Python chess engine supplies AI play. The frontend separates input and match presentation from rendering, while shared state coordinates them. The README documents the desktop wrapper, Three.js, and Python engine; the source index supports the frontend module relationships shown here. The exact bridge from browser-side AI requests to Python is not visible in the excerpts, so that connection is marked unverified.
Main entry points: main.js Application runtime · hud.js Match controls and HUD · input.js Move input and AI · board.js Board and markers
Components 18
Desktop runtime
- Desktop launcher
app.py - Game interface
web/index.html - Application runtime
web/main.js
Match and controls
- Chess AI
engine.py - Move input and AI
web/input.js - Match controls and HUD
web/hud.js
3D presentation
- Board and markers
web/board.js - Procedural pieces
web/pieces.js - Cathedral environment
web/cathedral.js - Renderer and materials
web/materials.js - Procedural textures
web/textures.js - Camera controls
web/camera.js
Shared services
- Game state
web/state.js - DOM access
web/dom.js - Settings persistence
web/settings.js - Notifications
web/toast.js - Synthesized audio
web/audio.js
Other components
- Player
Connections 40
- Player → Game interface: opens game
README.md - Desktop launcher → Game interface: hosts interface
README.md - Desktop launcher → Chess AI: integrates AI
README.md - Game interface → Application runtime: starts runtime
- Application runtime → Game state: uses state
web/main.js - Application runtime → DOM access: uses DOM
web/main.js - Application runtime → Renderer and materials: initializes renderer
web/main.js - Application runtime → Cathedral environment: builds environment
web/main.js - Application runtime → Board and markers: initializes board
web/main.js - Application runtime → Procedural pieces: builds pieces
web/main.js - Application runtime → Move input and AI: initializes input
web/main.js - Application runtime → Match controls and HUD: updates HUD
web/main.js - Application runtime → Camera controls: initializes camera
web/main.js - Application runtime → Settings persistence: loads settings
web/main.js - Move input and AI → Game state: reads and updates
web/input.js - Move input and AI → Board and markers: updates markers
web/input.js - Move input and AI → Match controls and HUD: updates display
web/input.js - Move input and AI → Notifications: shows messages
web/input.js - Move input and AI → Chess AI: requests AI move
- Match controls and HUD → Game state: reads and updates
web/hud.js - Match controls and HUD → Board and markers: syncs board
web/hud.js - Match controls and HUD → Move input and AI: triggers AI
web/hud.js - Match controls and HUD → Notifications: shows messages
web/hud.js - Match controls and HUD → Synthesized audio: controls audio
web/hud.js - Match controls and HUD → Settings persistence: saves settings
web/hud.js - Board and markers → Game state: reads board state
web/board.js - Board and markers → Procedural pieces: creates meshes
web/board.js - Board and markers → Renderer and materials: uses materials
web/board.js - Board and markers → Synthesized audio: plays capture sound
web/board.js - Procedural pieces → Renderer and materials: uses materials
web/pieces.js - Cathedral environment → Renderer and materials: uses materials
web/cathedral.js - Renderer and materials → Procedural textures: creates textures
web/materials.js - Camera controls → Game state: reads view state
web/camera.js - Camera controls → DOM access: uses controls
web/camera.js - Camera controls → Match controls and HUD: updates view UI
web/camera.js - Camera controls → Move input and AI: coordinates input
web/camera.js - Settings persistence → Game state: persists preferences
web/settings.js - Settings persistence → Synthesized audio: restores mute state
web/settings.js - Settings persistence → DOM access: updates controls
web/settings.js - Notifications → DOM access: uses container
web/toast.js