# arslanaman999/the-cursed-dungeon architecture

> Architecture diagram of the GitHub repository arslanaman999/the-cursed-dungeon, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/arslanaman999/the-cursed-dungeon
- Repository: https://github.com/arslanaman999/the-cursed-dungeon

## Overview

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`](https://github.com/arslanaman999/the-cursed-dungeon/blob/main/mainFile.cpp) (Game entry), [`Hero.h`](https://github.com/arslanaman999/the-cursed-dungeon/blob/main/Hero.h) (Hero base), [`Enemy.h`](https://github.com/arslanaman999/the-cursed-dungeon/blob/main/Enemy.h) (Enemy base), [`BattleLogic.h`](https://github.com/arslanaman999/the-cursed-dungeon/blob/main/BattleLogic.h) (Battle logic)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gameflow["Game flow"]
  node_main["Game entry<br/>[mainFile.cpp]"]
  node_battle["Battle logic<br/>[BattleLogic.h]"]
end

subgraph group_combat["Combat model"]
  node_hero["Hero base<br/>[Hero.h]"]
  node_enemy["Enemy base<br/>[Enemy.h]"]
  node_entity["Entity base<br/>[Entity.h]"]
  node_ability["Ability base<br/>[Ability.h]"]
  node_heal["Healing ability<br/>[HealAbility.h]"]
  node_strike["Power strike<br/>[PowerStrike.h]"]
end

subgraph group_roster["Character roster"]
  node_knight["Knight<br/>[Knight.h]"]
  node_healer["Healer<br/>[Healer.h]"]
  node_archer["Archer<br/>[Archer.h]"]
  node_shadow["Shadow<br/>[Shadow.h]"]
  node_goblin["Goblin<br/>[Goblin.h]"]
  node_assassin["Assassin<br/>[Assassin.h]"]
  node_giant["Giant<br/>[Giant.h]"]
  node_sorcerer["Sorcerer<br/>[Sorcerer.h]"]
end

subgraph group_results["Results"]
  node_round["Round tracking<br/>[Round.h]"]
  node_scoreentry["Score entry<br/>[ScoreEntry.h]"]
  node_scoreboard["Scoreboard writer<br/>[Scoreboard.h]"]
  node_resultfile["Game results file<br/>[game_results.txt]"]
end

node_player(("Player"))

node_player -->|"provides input"| node_main
node_main -->|"selects hero"| node_hero
node_main -->|"constructs"| node_knight
node_main -->|"constructs"| node_healer
node_main -->|"constructs"| node_archer
node_main -->|"constructs"| node_shadow
node_main -->|"constructs"| node_goblin
node_main -->|"constructs"| node_assassin
node_main -->|"constructs"| node_giant
node_main -->|"constructs"| node_sorcerer
node_main -->|"checks and dispatches"| node_battle
node_main -->|"invokes special move"| node_hero
node_main -->|"creates round"| node_round
node_main -->|"writes final result"| node_scoreboard
node_battle -->|"uses"| node_hero
node_battle -->|"attacks and damages"| node_enemy
node_battle -->|"dispatches ability"| node_ability
node_ability -->|"implemented by"| node_heal
node_ability -->|"implemented by"| node_strike
node_heal -->|"restores health"| node_hero
node_strike -->|"deals damage"| node_enemy
node_round -->|"reads damage totals"| node_hero
node_round -->|"creates"| node_scoreentry
node_scoreboard -->|"appends result"| node_resultfile
node_hero -->|"extends"| node_entity
node_enemy -->|"extends"| node_entity
node_knight -->|"extends"| node_hero
node_healer -->|"extends"| node_hero
node_archer -->|"extends"| node_hero
node_shadow -->|"extends"| node_hero
node_goblin -->|"extends"| node_enemy
node_assassin -->|"extends"| node_enemy
node_giant -->|"extends"| node_enemy
node_sorcerer -->|"extends"| node_enemy
node_knight -->|"creates"| node_heal
node_knight -->|"creates"| node_strike

click node_main "https://github.com/arslanaman999/the-cursed-dungeon/blob/main/mainFile.cpp"
click node_hero "https://github.com/arslanaman999/the-cursed-dungeon/blob/main/Hero.h"
click node_enemy "https://github.com/arslanaman999/the-cursed-dungeon/blob/main/Enemy.h"
click node_battle "https://github.com/arslanaman999/the-cursed-dungeon/blob/main/BattleLogic.h"
click node_round "https://github.com/arslanaman999/the-cursed-dungeon/blob/main/Round.h"
click node_entity "https://github.com/arslanaman999/the-cursed-dungeon/blob/main/Entity.h"
click node_ability "https://github.com/arslanaman999/the-cursed-dungeon/blob/main/Ability.h"
click node_heal "https://github.com/arslanaman999/the-cursed-dungeon/blob/main/HealAbility.h"
click node_strike "https://github.com/arslanaman999/the-cursed-dungeon/blob/main/PowerStrike.h"
click node_knight "https://github.com/arslanaman999/the-cursed-dungeon/blob/main/Knight.h"
click node_healer "https://github.com/arslanaman999/the-cursed-dungeon/blob/main/Healer.h"
click node_archer "https://github.com/arslanaman999/the-cursed-dungeon/blob/main/Archer.h"
click node_shadow "https://github.com/arslanaman999/the-cursed-dungeon/blob/main/Shadow.h"
click node_goblin "https://github.com/arslanaman999/the-cursed-dungeon/blob/main/Goblin.h"
click node_assassin "https://github.com/arslanaman999/the-cursed-dungeon/blob/main/Assassin.h"
click node_giant "https://github.com/arslanaman999/the-cursed-dungeon/blob/main/Giant.h"
click node_sorcerer "https://github.com/arslanaman999/the-cursed-dungeon/blob/main/Sorcerer.h"
click node_scoreentry "https://github.com/arslanaman999/the-cursed-dungeon/blob/main/ScoreEntry.h"
click node_scoreboard "https://github.com/arslanaman999/the-cursed-dungeon/blob/main/Scoreboard.h"
click node_resultfile "https://github.com/arslanaman999/the-cursed-dungeon/blob/main/game_results.txt"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_battle toneBlue
class node_hero,node_enemy,node_entity,node_ability,node_heal,node_strike toneAmber
class node_knight,node_healer,node_archer,node_shadow,node_goblin,node_assassin,node_giant,node_sorcerer toneMint
class node_round,node_scoreentry,node_scoreboard,node_resultfile toneRose
class node_player toneIndigo
```

## Components

### Game flow

- [Game entry](https://github.com/arslanaman999/the-cursed-dungeon/blob/main/mainFile.cpp): `mainFile.cpp`
- [Battle logic](https://github.com/arslanaman999/the-cursed-dungeon/blob/main/BattleLogic.h): `BattleLogic.h`

### Combat model

- [Hero base](https://github.com/arslanaman999/the-cursed-dungeon/blob/main/Hero.h): `Hero.h`
- [Enemy base](https://github.com/arslanaman999/the-cursed-dungeon/blob/main/Enemy.h): `Enemy.h`
- [Entity base](https://github.com/arslanaman999/the-cursed-dungeon/blob/main/Entity.h): `Entity.h`
- [Ability base](https://github.com/arslanaman999/the-cursed-dungeon/blob/main/Ability.h): `Ability.h`
- [Healing ability](https://github.com/arslanaman999/the-cursed-dungeon/blob/main/HealAbility.h): `HealAbility.h`
- [Power strike](https://github.com/arslanaman999/the-cursed-dungeon/blob/main/PowerStrike.h): `PowerStrike.h`

### Character roster

- [Knight](https://github.com/arslanaman999/the-cursed-dungeon/blob/main/Knight.h): `Knight.h`
- [Healer](https://github.com/arslanaman999/the-cursed-dungeon/blob/main/Healer.h): `Healer.h`
- [Archer](https://github.com/arslanaman999/the-cursed-dungeon/blob/main/Archer.h): `Archer.h`
- [Shadow](https://github.com/arslanaman999/the-cursed-dungeon/blob/main/Shadow.h): `Shadow.h`
- [Goblin](https://github.com/arslanaman999/the-cursed-dungeon/blob/main/Goblin.h): `Goblin.h`
- [Assassin](https://github.com/arslanaman999/the-cursed-dungeon/blob/main/Assassin.h): `Assassin.h`
- [Giant](https://github.com/arslanaman999/the-cursed-dungeon/blob/main/Giant.h): `Giant.h`
- [Sorcerer](https://github.com/arslanaman999/the-cursed-dungeon/blob/main/Sorcerer.h): `Sorcerer.h`

### Results

- [Round tracking](https://github.com/arslanaman999/the-cursed-dungeon/blob/main/Round.h): `Round.h`
- [Score entry](https://github.com/arslanaman999/the-cursed-dungeon/blob/main/ScoreEntry.h): `ScoreEntry.h`
- [Scoreboard writer](https://github.com/arslanaman999/the-cursed-dungeon/blob/main/Scoreboard.h): `Scoreboard.h`
- [Game results file](https://github.com/arslanaman999/the-cursed-dungeon/blob/main/game_results.txt): `game_results.txt`

### Other components

- **Player**

## Connections

- 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
