How prototype9111/wargames-joshua works
Joshua is a desktop recreation of the WOPR strategy terminal. A user enters commands in the SFML terminal; the application submits them to the SFML-independent JoshuaCore, which returns dialogue or game/simulation output for animated display. The principal domain paths are command/dialogue, tic-tac-toe with minimax, and timed offline war simulation. The interface also provides command history, status indicators, screenshots, and CRT post-processing. Some implementation excerpts are partial; optional wiring beyond documented calls is omitted.
Main entry points: Application.cpp Window and Input · JoshuaCore.cpp JoshuaCore Dispatcher · main.cpp Application Entry · crt.frag CRT Post-Processing
Components 15
Terminal Interface
- Application Entry
src/main.cpp - Window and Input
src/Application.cpp - Command History
src/Application.cpp - Animated Output
src/Application.cpp - Terminal Renderer
src/Application.cpp - Status Indicators
src/Application.cpp - Screenshot Capture
src/Application.cpp
Joshua Simulation Core
- JoshuaCore Dispatcher
src/JoshuaCore.cpp - Dialogue and Commands
src/JoshuaCore.cpp - Tic-Tac-Toe
src/JoshuaCore.cpp - Minimax Opponent
src/JoshuaCore.cpp - War Simulation
src/JoshuaCore.cpp
Display Assets
- CRT Post-Processing
assets/shaders/crt.frag - VT323 Font
assets/fonts
Other components
- Terminal User
Connections 16
- Terminal User → Window and Input: enters commands
- Application Entry → Window and Input: starts
- Window and Input → Command History: records input
- Window and Input → JoshuaCore Dispatcher: submits commands
- Window and Input → JoshuaCore Dispatcher: updates simulation
- JoshuaCore Dispatcher → Dialogue and Commands: dispatches terminal mode
- JoshuaCore Dispatcher → Tic-Tac-Toe: dispatches game mode
- JoshuaCore Dispatcher → War Simulation: dispatches simulation mode
- Tic-Tac-Toe → Minimax Opponent: chooses AI move
- JoshuaCore Dispatcher → Window and Input: returns results
- Window and Input → Animated Output: queues responses
- Animated Output → Terminal Renderer: draws text
- Terminal Renderer → Status Indicators: renders status
- Terminal Renderer → CRT Post-Processing: applies shader
- Terminal Renderer → VT323 Font: renders text
- Window and Input → Screenshot Capture: captures display