How arslanaman999/the-cursed-dungeon works
The repository is a console dungeon-combat game: the player chooses a hero, fights a sequence of enemies, and the game appends a final score to a text file. The graph follows the entry point’s orchestration and the sampled combat and scoring calls. The README gives no further capability detail, and several class implementations were not sampled, so their internal wiring is left out.
Main entry points: mainFile.cpp Game entry · Hero.h Hero base · Enemy.h Enemy base · BattleLogic.h Battle logic
Components 21
Game flow
- Game entry
mainFile.cpp - Battle logic
BattleLogic.h
Combat model
- Hero base
Hero.h - Enemy base
Enemy.h - Entity base
Entity.h - Ability base
Ability.h - Healing ability
HealAbility.h - Power strike
PowerStrike.h
Character roster
Results
- Round tracking
Round.h - Score entry
ScoreEntry.h - Scoreboard writer
Scoreboard.h - Game results file
game_results.txt
Other components
- Player
Connections 36
- Player → Game entry: provides input
- Game entry → Hero base: selects hero
- Game entry → Knight: constructs
- Game entry → Healer: constructs
- Game entry → Archer: constructs
- Game entry → Shadow: constructs
- Game entry → Goblin: constructs
- Game entry → Assassin: constructs
- Game entry → Giant: constructs
- Game entry → Sorcerer: constructs
- Game entry → Battle logic: checks and dispatches
- Game entry → Hero base: invokes special move
- Game entry → Round tracking: creates round
- Game entry → Scoreboard writer: writes final result
- Battle logic → Hero base: uses
- Battle logic → Enemy base: attacks and damages
- Battle logic → Ability base: dispatches ability
- Ability base → Healing ability: implemented by
- Ability base → Power strike: implemented by
- Healing ability → Hero base: restores health
- Power strike → Enemy base: deals damage
- Round tracking → Hero base: reads damage totals
- Round tracking → Score entry: creates
- Scoreboard writer → Game results file: appends result
- Hero base → Entity base: extends
- Enemy base → Entity base: extends
- Knight → Hero base: extends
- Healer → Hero base: extends
- Archer → Hero base: extends
- Shadow → Hero base: extends
- Goblin → Enemy base: extends
- Assassin → Enemy base: extends
- Giant → Enemy base: extends
- Sorcerer → Enemy base: extends
- Knight → Healing ability: creates
- Knight → Power strike: creates