How gasmith/deckard works
Main Components
a) Core Engine Layer:
• Base components from src/french.rs (French card system) and src/deck.rs
• Use a solid foundation block to represent these core components
b) Game Implementation Layer:
• Above the core engine
• Center around src/euchre/ as the primary game implementation
• Subdivide into key modules:
• Game State (game.rs, round.rs, trick.rs)
• Card Logic (card.rs)
• Player System (player/)
• Action System (action.rs)
c) Player Interface Layer:
• Split into two parallel components:
• Console Player (player/console.rs)
• Robot Player (player/robot.rs)
• How they implement the player interface
d) Terminal UI System:
• This as a top-level component
• Components from src/euchre/tui/
• Subdivide into:
• Main Arena (arena.rs)
• Game Information Display (info.rs, scoreboard.rs)
• Hand Display (hand.rs)
• History Browser (history/)
e) Logging System:
• As a cross-cutting concern
• Round/log/ components
• Tree-structured format
• Blue: Data flow
• Green: User input
• Orange: Game state changes
• Purple: Logging operations
Additional Elements
• Notes about key bindings near relevant components
• Configuration flow from args.rs
• GitHub workflow integration points
Technical Details to Highlight
• Rust-specific architecture patterns
• Error handling system (error.rs)
• State machine patterns in the game logic
• Component interfaces and trait implementations
Future Extensibility
• Placeholder connections for:
• Additional game implementations
• HTTP/JS frontend
• Analysis/coaching systems