# tjtec/quantomix-2024-5 architecture

> Architecture diagram of the GitHub repository tjtec/quantomix-2024-5, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tjtec/quantomix-2024-5
- Repository: https://github.com/tjtec/quantomix-2024-5

## Overview

This is a Kotlin educational battle-game project: coaches field Quantomix creatures, and battle logic resolves rounds, attacks, damage, type effectiveness, and status effects. GameState and DTOs represent saved game state, while a small CSV parser handles delimited input. The README is still a project template and documents no product workflow or feature list; the graph therefore reflects source-index relationships, not a claimed user interface or complete runtime sequence.

Main entry points: [`src/main/kotlin/hwr/oop/quantomix/fight/objects/BattleStats.kt`](https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/objects/BattleStats.kt) (Battle stats), [`src/main/kotlin/hwr/oop/quantomix/fight/logic/Battle.kt`](https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/logic/Battle.kt) (Battle), [`src/main/kotlin/hwr/oop/quantomix/memory/GameState.kt`](https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/memory/GameState.kt) (Game state), [`src/main/kotlin/hwr/oop/quantomix/fight/logic/DamageCalculator.kt`](https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/logic/DamageCalculator.kt) (Damage calculator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_battle["Battle flow"]
  node_battle["Battle<br/>[Battle.kt]"]
  node_round["Round<br/>[Round.kt]"]
  node_fundamentals["Battle settings"]
end

subgraph group_combat["Combat rules"]
  node_attack["Attacks<br/>[Attack.kt]"]
  node_stats["Stats and effects<br/>[Stats.kt]"]
  node_battle_stats["Battle stats<br/>[BattleStats.kt]"]
  node_status["Status effects<br/>[Status.kt]"]
  node_status_helper["Status helper<br/>[StatusHelper.kt]"]
  node_status_info["Status timing"]
  node_damage_context["Damage context<br/>[DamageContext.kt]"]
  node_damage_calculator["Damage calculator"]
  node_effectivity["Type effectiveness"]
  node_damage_strategy["Damage strategy<br/>[DamageStrategy.kt]"]
  node_standard_strategy["Standard damage"]
  node_complex_strategy["Complex damage"]
  node_mode["Damage modes"]
end

subgraph group_domain["Game domain"]
  node_coach["Coach teams<br/>[Coach.kt]"]
  node_creature["Quantomix<br/>[Quantomix.kt]"]
  node_type["Types<br/>[Typ.kt]"]
end

subgraph group_state["State and parsing"]
  node_game_state["Game state<br/>[GameState.kt]"]
  node_battle_dto["Battle settings DTO"]
  node_csv_file["CSV file parser<br/>[CsvFile.kt]"]
  node_csv_line["CSV line parser<br/>[CsvLine.kt]"]
end

node_player(("Player"))

node_player -.->|"starts battle"| node_battle
node_battle -->|"uses teams"| node_coach
node_battle -->|"selects combatants"| node_creature
node_battle -->|"tracks stats"| node_battle_stats
node_battle -->|"uses settings"| node_fundamentals
node_battle -->|"runs rounds"| node_round
node_round -->|"applies damage"| node_damage_strategy
node_fundamentals -->|"selects strategy"| node_damage_strategy
node_fundamentals -->|"sets mode"| node_mode
node_standard_strategy -->|"calculates damage"| node_damage_calculator
node_complex_strategy -->|"calculates damage"| node_damage_calculator
node_damage_calculator -->|"reads context"| node_damage_context
node_damage_calculator -->|"gets effectiveness"| node_effectivity
node_damage_context -->|"derives status"| node_status_helper
node_effectivity -->|"checks type rules"| node_type
node_attack -->|"uses attack type"| node_type
node_attack -->|"changes battle state"| node_battle_stats
node_battle_stats -->|"tracks creature"| node_creature
node_battle_stats -->|"updates stats"| node_stats
node_battle_stats -->|"calculates status"| node_status
node_status -->|"returns effects"| node_status_helper
node_status -->|"checks duration"| node_status_info
node_coach -->|"filters living team"| node_battle_stats
node_game_state -->|"uses DTO"| node_battle_dto
node_game_state -->|"stores team"| node_coach
node_game_state -->|"stores creatures"| node_creature
node_game_state -->|"stores battle stats"| node_battle_stats
node_csv_file -->|"parses lines"| node_csv_line

click node_coach "https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/objects/Coach.kt"
click node_creature "https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/monster/Quantomix.kt"
click node_type "https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/objects/Typ.kt"
click node_attack "https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/objects/Attack.kt"
click node_stats "https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/objects/Stats.kt"
click node_battle_stats "https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/objects/BattleStats.kt"
click node_status "https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/objects/Status.kt"
click node_status_helper "https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/objects/StatusHelper.kt"
click node_status_info "https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/objects/UsefulInformationForStatus.kt"
click node_battle "https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/logic/Battle.kt"
click node_round "https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/logic/Round.kt"
click node_fundamentals "https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/logic/BattleFundamentals.kt"
click node_damage_context "https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/logic/DamageContext.kt"
click node_damage_calculator "https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/logic/DamageCalculator.kt"
click node_effectivity "https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/logic/EffectivityCalculator.kt"
click node_damage_strategy "https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/logic/DamageStrategy.kt"
click node_standard_strategy "https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/logic/StandardDamageStrategy.kt"
click node_complex_strategy "https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/logic/ComplexDamageStrategy.kt"
click node_mode "https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/logic/ModeOfDamageCalculation.kt"
click node_game_state "https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/memory/GameState.kt"
click node_battle_dto "https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/memory/BattleFundamentalsDTO.kt"
click node_csv_file "https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/memory/csvparser/CsvFile.kt"
click node_csv_line "https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/memory/csvparser/CsvLine.kt"

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_battle,node_round,node_fundamentals toneBlue
class node_attack,node_stats,node_battle_stats,node_status,node_status_helper,node_status_info,node_damage_context,node_damage_calculator,node_effectivity,node_damage_strategy,node_standard_strategy,node_complex_strategy,node_mode toneAmber
class node_coach,node_creature,node_type toneMint
class node_game_state,node_battle_dto,node_csv_file,node_csv_line toneRose
class node_player toneIndigo
```

## Components

### Battle flow

- [Battle](https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/logic/Battle.kt): `src/main/kotlin/hwr/oop/quantomix/fight/logic/Battle.kt`
- [Round](https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/logic/Round.kt): `src/main/kotlin/hwr/oop/quantomix/fight/logic/Round.kt`
- [Battle settings](https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/logic/BattleFundamentals.kt): `src/main/kotlin/hwr/oop/quantomix/fight/logic/BattleFundamentals.kt`

### Combat rules

- [Attacks](https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/objects/Attack.kt): `src/main/kotlin/hwr/oop/quantomix/fight/objects/Attack.kt`
- [Stats and effects](https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/objects/Stats.kt): `src/main/kotlin/hwr/oop/quantomix/fight/objects/Stats.kt`
- [Battle stats](https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/objects/BattleStats.kt): `src/main/kotlin/hwr/oop/quantomix/fight/objects/BattleStats.kt`
- [Status effects](https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/objects/Status.kt): `src/main/kotlin/hwr/oop/quantomix/fight/objects/Status.kt`
- [Status helper](https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/objects/StatusHelper.kt): `src/main/kotlin/hwr/oop/quantomix/fight/objects/StatusHelper.kt`
- [Status timing](https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/objects/UsefulInformationForStatus.kt): `src/main/kotlin/hwr/oop/quantomix/fight/objects/UsefulInformationForStatus.kt`
- [Damage context](https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/logic/DamageContext.kt): `src/main/kotlin/hwr/oop/quantomix/fight/logic/DamageContext.kt`
- [Damage calculator](https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/logic/DamageCalculator.kt): `src/main/kotlin/hwr/oop/quantomix/fight/logic/DamageCalculator.kt`
- [Type effectiveness](https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/logic/EffectivityCalculator.kt): `src/main/kotlin/hwr/oop/quantomix/fight/logic/EffectivityCalculator.kt`
- [Damage strategy](https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/logic/DamageStrategy.kt): `src/main/kotlin/hwr/oop/quantomix/fight/logic/DamageStrategy.kt`
- [Standard damage](https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/logic/StandardDamageStrategy.kt): `src/main/kotlin/hwr/oop/quantomix/fight/logic/StandardDamageStrategy.kt`
- [Complex damage](https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/logic/ComplexDamageStrategy.kt): `src/main/kotlin/hwr/oop/quantomix/fight/logic/ComplexDamageStrategy.kt`
- [Damage modes](https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/fight/logic/ModeOfDamageCalculation.kt): `src/main/kotlin/hwr/oop/quantomix/fight/logic/ModeOfDamageCalculation.kt`

### Game domain

- [Coach teams](https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/objects/Coach.kt): `src/main/kotlin/hwr/oop/quantomix/objects/Coach.kt`
- [Quantomix](https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/monster/Quantomix.kt): `src/main/kotlin/hwr/oop/quantomix/monster/Quantomix.kt`
- [Types](https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/objects/Typ.kt): `src/main/kotlin/hwr/oop/quantomix/objects/Typ.kt`

### State and parsing

- [Game state](https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/memory/GameState.kt): `src/main/kotlin/hwr/oop/quantomix/memory/GameState.kt`
- [Battle settings DTO](https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/memory/BattleFundamentalsDTO.kt): `src/main/kotlin/hwr/oop/quantomix/memory/BattleFundamentalsDTO.kt`
- [CSV file parser](https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/memory/csvparser/CsvFile.kt): `src/main/kotlin/hwr/oop/quantomix/memory/csvparser/CsvFile.kt`
- [CSV line parser](https://github.com/tjtec/quantomix-2024-5/blob/main/src/main/kotlin/hwr/oop/quantomix/memory/csvparser/CsvLine.kt): `src/main/kotlin/hwr/oop/quantomix/memory/csvparser/CsvLine.kt`

### Other components

- **Player**

## Connections

- Player → Battle: starts battle
- Battle → Coach teams: uses teams (evidence: `src/main/kotlin/hwr/oop/quantomix/fight/logic/Battle.kt`)
- Battle → Quantomix: selects combatants (evidence: `src/main/kotlin/hwr/oop/quantomix/fight/logic/Battle.kt`)
- Battle → Battle stats: tracks stats (evidence: `src/main/kotlin/hwr/oop/quantomix/fight/logic/Battle.kt`)
- Battle → Battle settings: uses settings (evidence: `src/main/kotlin/hwr/oop/quantomix/fight/logic/Battle.kt`)
- Battle → Round: runs rounds (evidence: `src/main/kotlin/hwr/oop/quantomix/fight/logic/Battle.kt`)
- Round → Damage strategy: applies damage (evidence: `src/main/kotlin/hwr/oop/quantomix/fight/logic/Round.kt`)
- Battle settings → Damage strategy: selects strategy (evidence: `src/main/kotlin/hwr/oop/quantomix/fight/logic/BattleFundamentals.kt`)
- Battle settings → Damage modes: sets mode (evidence: `src/main/kotlin/hwr/oop/quantomix/fight/logic/BattleFundamentals.kt`)
- Standard damage → Damage calculator: calculates damage (evidence: `src/main/kotlin/hwr/oop/quantomix/fight/logic/StandardDamageStrategy.kt`)
- Complex damage → Damage calculator: calculates damage (evidence: `src/main/kotlin/hwr/oop/quantomix/fight/logic/ComplexDamageStrategy.kt`)
- Damage calculator → Damage context: reads context (evidence: `src/main/kotlin/hwr/oop/quantomix/fight/logic/DamageCalculator.kt`)
- Damage calculator → Type effectiveness: gets effectiveness (evidence: `src/main/kotlin/hwr/oop/quantomix/fight/logic/DamageCalculator.kt`)
- Damage context → Status helper: derives status (evidence: `src/main/kotlin/hwr/oop/quantomix/fight/logic/DamageContext.kt`)
- Type effectiveness → Types: checks type rules (evidence: `src/main/kotlin/hwr/oop/quantomix/fight/logic/EffectivityCalculator.kt`)
- Attacks → Types: uses attack type (evidence: `src/main/kotlin/hwr/oop/quantomix/fight/objects/Attack.kt`)
- Attacks → Battle stats: changes battle state (evidence: `src/main/kotlin/hwr/oop/quantomix/fight/objects/Attack.kt`)
- Battle stats → Quantomix: tracks creature (evidence: `src/main/kotlin/hwr/oop/quantomix/fight/objects/BattleStats.kt`)
- Battle stats → Stats and effects: updates stats (evidence: `src/main/kotlin/hwr/oop/quantomix/fight/objects/BattleStats.kt`)
- Battle stats → Status effects: calculates status (evidence: `src/main/kotlin/hwr/oop/quantomix/fight/objects/BattleStats.kt`)
- Status effects → Status helper: returns effects (evidence: `src/main/kotlin/hwr/oop/quantomix/fight/objects/Status.kt`)
- Status effects → Status timing: checks duration (evidence: `src/main/kotlin/hwr/oop/quantomix/fight/objects/Status.kt`)
- Coach teams → Battle stats: filters living team (evidence: `src/main/kotlin/hwr/oop/quantomix/objects/Coach.kt`)
- Game state → Battle settings DTO: uses DTO (evidence: `src/main/kotlin/hwr/oop/quantomix/memory/GameState.kt`)
- Game state → Coach teams: stores team (evidence: `src/main/kotlin/hwr/oop/quantomix/memory/GameState.kt`)
- Game state → Quantomix: stores creatures (evidence: `src/main/kotlin/hwr/oop/quantomix/memory/GameState.kt`)
- Game state → Battle stats: stores battle stats (evidence: `src/main/kotlin/hwr/oop/quantomix/memory/GameState.kt`)
- CSV file parser → CSV line parser: parses lines (evidence: `src/main/kotlin/hwr/oop/quantomix/memory/csvparser/CsvFile.kt`)
