How dragon-hatcher/type-system-chess works
Key Components to Include:
Dual Implementation Structure
• Create two main parallel branches showing Rust and TypeScript implementations
Core Components (for each implementation)
Rust Implementation:
a. Board Representation (/rust/src/board_rep/)
• Board state management
• Piece representation
• Square/position handling
b. Move Generation (/rust/src/move_gen/)
• Piece-specific move generators
• Attack calculation
• Castling logic
• Check detection
c. Game State (/rust/src/state/)
• Game outcome handling
• State management
TypeScript Implementation:
• More condensed structure with core files:
• Handling (position.ts)
• Move generation (movegen.ts)
• Game state management (game-state.ts)
• FEN parsing (Fen.ts)
Interaction Flows
• How move generation depends on board representation
• State transitions
• Validation flows
Component Representation
• Use rectangles for modules
• Use hexagons for type system components
• Use diamonds for decision points
Additional Notes
• Recursion limits in Rust implementation
• Different complexity levels (5000 vs 900 lines)
• Parallel nature of implementations
Key Aspects to Emphasize:
Type System Integration
• How the chess logic is embedded in the type systems
• Where type-level computation occurs
Feature Implementation
• Chess rules implementation
• Move validation
• Special moves (castling, en passant, promotion)
Remember to include a note about the unique nature of this project as a type system implementation, distinguishing it from traditional chess engine architectures.