How samualtnorman/binmat works
Main Components to Include:
Core Simulator Components
• Game State Manager (makeState.ts)
• Move Processor (doMove.ts)
• Combat System (doCombat.ts)
Move Processing Subsystem
• Combat Moves (doMoveCombat.ts)
• Discard Moves (doMoveDiscard.ts)
• Pass Moves (doMovePass.ts)
• Play Moves (doMovePlay.ts, doMovePlayFaceUp.ts)
Parser Components
• A "Parser System" section containing:
• Move Parser (parseMove.ts)
• Binlog Parser (parseBinlog.ts, parseBinlogMove.ts)
Utility Components
• A "Utilities" section for:
• Card Validation (isCard.ts, isCardStringFace.ts, isCardStringSuit.ts)
• Argument Generation (generateArgs.ts)
• Move String Conversion (moveToString.ts)
Game Scripts Integration
• Integration with hackmud game via:
• binmat.ts
• binmat_lib.ts
Use a layered approach
• Top Layer: External Interface (hackmud game integration)
• Middle Layer: Core Simulator Components
• Bottom Layer: Utility Functions and Parsers
Connection Types
Specific Implementation Details:
Test integration
• A "Testing Framework" component connecting to all major systems
• Example brain testing system
State Management
• How game state flows through the system
• Role of StatusCode.ts and Role.ts in the state management
Build System
• A small section showing the build pipeline:
• TypeScript compilation
• Script packaging
• hackmud integration
Key Relationships to Highlight:
How the brain testing system interfaces with the simulator
Level of Detail:
• Keep main components visible at a glance
• Use expandable/collapsible sections for move processors
• Annotations for critical paths and important interactions
Remember to:
• Version compatibility (Node.js 18, 20, and above)
• Test integration points
• Brain testing interface
• Build and deployment paths