How rajfal/attack-of-the-orcs works
Main Components
a. Core Game Engine Components:
• Game Runner (run_game.py)
• Game Units Factory (factoryutils.py)
• Game Utilities (gameutils.py)
b. Game Entities:
• Abstract Game Unit (abstractgameunit.py)
• Knight (knight.py)
• Orc Rider (orcrider.py)
• Hut (hut.py)
c. Game Scenarios:
• Attack of the Orcs (attackoftheorcs.py)
Relationships to Emphasize
a. Factory Pattern:
• Factoryutils.py creating instances of Knight and OrcRider
• Factory's relationship with AbstractGameUnit
b. Game Flow:
• How run_game.py initializes the game scenario
• How attackoftheorcs.py orchestrates the game elements
Additional Details
a. Method signatures for key classes:
• AbstractGameUnit: Core game unit behaviors
• Knight/OrcRider: Specific unit implementations
• Hut: Structure and occupant management
b. Annotations for:
• Design patterns used (Factory pattern)
• Key game mechanics
• Important class relationships