How m4xxh/scheresteinpapier works
Input/Interface Layer
• Command Line Interface (CLI)
• Argument Parser Component
• User Input Handler
Game Core
• Game Controller
• Rule Engine
• Score Keeper
• Game State Manager
Rules System
• Rule Parser
• Rule Storage
• Rule Validator
File System Integration
• Rules File Reader
• Custom Rules Parser
Use a top-down approach with these levels
• [User Interface Layer]
• ↓
• [Game Controller Layer]
• ↓
• [Rules Engine Layer]
• ↓
• [File System Layer]
Component Relationships
• User input → CLI Parser → Game Controller
• Game Controller ↔ Rule Engine
• Rule Engine ↔ File System (for reading rule files)
• Game Controller → Score Keeper
• Score Keeper → Game State Manager
Specific elements
• Input validation flow
• Rule selection logic (classic vs. extended vs. custom)
• Win condition handling
• Game state transitions
Special Considerations:
Flexibility of the rules system
• How custom rules can be loaded from external files
• Parsing mechanism for different rule formats
Three winning conditions
• Best-out-of-X
• Number of games
• Number of wins