How tjtec/quantomix-2024-5 works
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: BattleStats.kt Battle stats · Battle.kt Battle · GameState.kt Game state · DamageCalculator.kt Damage calculator
Components 24
Battle flow
- Battle
src/main/kotlin/hwr/oop/quantomix/fight/logic/Battle.kt - Round
src/main/kotlin/hwr/oop/quantomix/fight/logic/Round.kt - Battle settings
src/main/kotlin/hwr/oop/quantomix/fight/logic/BattleFundamentals.kt
Combat rules
- Attacks
src/main/kotlin/hwr/oop/quantomix/fight/objects/Attack.kt - Stats and effects
src/main/kotlin/hwr/oop/quantomix/fight/objects/Stats.kt - Battle stats
src/main/kotlin/hwr/oop/quantomix/fight/objects/BattleStats.kt - Status effects
src/main/kotlin/hwr/oop/quantomix/fight/objects/Status.kt - Status helper
src/main/kotlin/hwr/oop/quantomix/fight/objects/StatusHelper.kt - Status timing
src/main/kotlin/hwr/oop/quantomix/fight/objects/UsefulInformationForStatus.kt - Damage context
src/main/kotlin/hwr/oop/quantomix/fight/logic/DamageContext.kt - Damage calculator
src/main/kotlin/hwr/oop/quantomix/fight/logic/DamageCalculator.kt - Type effectiveness
src/main/kotlin/hwr/oop/quantomix/fight/logic/EffectivityCalculator.kt - Damage strategy
src/main/kotlin/hwr/oop/quantomix/fight/logic/DamageStrategy.kt - Standard damage
src/main/kotlin/hwr/oop/quantomix/fight/logic/StandardDamageStrategy.kt - Complex damage
src/main/kotlin/hwr/oop/quantomix/fight/logic/ComplexDamageStrategy.kt - Damage modes
src/main/kotlin/hwr/oop/quantomix/fight/logic/ModeOfDamageCalculation.kt
Game domain
- Coach teams
src/main/kotlin/hwr/oop/quantomix/objects/Coach.kt - Quantomix
src/main/kotlin/hwr/oop/quantomix/monster/Quantomix.kt - Types
src/main/kotlin/hwr/oop/quantomix/objects/Typ.kt
State and parsing
- Game state
src/main/kotlin/hwr/oop/quantomix/memory/GameState.kt - Battle settings DTO
src/main/kotlin/hwr/oop/quantomix/memory/BattleFundamentalsDTO.kt - CSV file parser
src/main/kotlin/hwr/oop/quantomix/memory/csvparser/CsvFile.kt - CSV line parser
src/main/kotlin/hwr/oop/quantomix/memory/csvparser/CsvLine.kt
Other components
- Player
Connections 28
- Player → Battle: starts battle
- Battle → Coach teams: uses teams
src/main/kotlin/hwr/oop/quantomix/fight/logic/Battle.kt - Battle → Quantomix: selects combatants
src/main/kotlin/hwr/oop/quantomix/fight/logic/Battle.kt - Battle → Battle stats: tracks stats
src/main/kotlin/hwr/oop/quantomix/fight/logic/Battle.kt - Battle → Battle settings: uses settings
src/main/kotlin/hwr/oop/quantomix/fight/logic/Battle.kt - Battle → Round: runs rounds
src/main/kotlin/hwr/oop/quantomix/fight/logic/Battle.kt - Round → Damage strategy: applies damage
src/main/kotlin/hwr/oop/quantomix/fight/logic/Round.kt - Battle settings → Damage strategy: selects strategy
src/main/kotlin/hwr/oop/quantomix/fight/logic/BattleFundamentals.kt - Battle settings → Damage modes: sets mode
src/main/kotlin/hwr/oop/quantomix/fight/logic/BattleFundamentals.kt - Standard damage → Damage calculator: calculates damage
src/main/kotlin/hwr/oop/quantomix/fight/logic/StandardDamageStrategy.kt - Complex damage → Damage calculator: calculates damage
src/main/kotlin/hwr/oop/quantomix/fight/logic/ComplexDamageStrategy.kt - Damage calculator → Damage context: reads context
src/main/kotlin/hwr/oop/quantomix/fight/logic/DamageCalculator.kt - Damage calculator → Type effectiveness: gets effectiveness
src/main/kotlin/hwr/oop/quantomix/fight/logic/DamageCalculator.kt - Damage context → Status helper: derives status
src/main/kotlin/hwr/oop/quantomix/fight/logic/DamageContext.kt - Type effectiveness → Types: checks type rules
src/main/kotlin/hwr/oop/quantomix/fight/logic/EffectivityCalculator.kt - Attacks → Types: uses attack type
src/main/kotlin/hwr/oop/quantomix/fight/objects/Attack.kt - Attacks → Battle stats: changes battle state
src/main/kotlin/hwr/oop/quantomix/fight/objects/Attack.kt - Battle stats → Quantomix: tracks creature
src/main/kotlin/hwr/oop/quantomix/fight/objects/BattleStats.kt - Battle stats → Stats and effects: updates stats
src/main/kotlin/hwr/oop/quantomix/fight/objects/BattleStats.kt - Battle stats → Status effects: calculates status
src/main/kotlin/hwr/oop/quantomix/fight/objects/BattleStats.kt - Status effects → Status helper: returns effects
src/main/kotlin/hwr/oop/quantomix/fight/objects/Status.kt - Status effects → Status timing: checks duration
src/main/kotlin/hwr/oop/quantomix/fight/objects/Status.kt - Coach teams → Battle stats: filters living team
src/main/kotlin/hwr/oop/quantomix/objects/Coach.kt - Game state → Battle settings DTO: uses DTO
src/main/kotlin/hwr/oop/quantomix/memory/GameState.kt - Game state → Coach teams: stores team
src/main/kotlin/hwr/oop/quantomix/memory/GameState.kt - Game state → Quantomix: stores creatures
src/main/kotlin/hwr/oop/quantomix/memory/GameState.kt - Game state → Battle stats: stores battle stats
src/main/kotlin/hwr/oop/quantomix/memory/GameState.kt - CSV file parser → CSV line parser: parses lines
src/main/kotlin/hwr/oop/quantomix/memory/csvparser/CsvFile.kt