# kuyamoakel/dcit50-card-game architecture

> Architecture diagram of the GitHub repository kuyamoakel/dcit50-card-game, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kuyamoakel/dcit50-card-game
- Repository: https://github.com/kuyamoakel/dcit50-card-game

## Overview

This is a console card-battle game: the player starts a match, selects a difficulty, faces a randomly chosen boss, chooses cards to play, and receives a battle result. The runtime separates match setup and turn orchestration, boss/player state, and card effects. The README also documents boss variation, card-stat/status commands, and damage-over-time effects. The graph follows the sampled Java calls; it does not assume unsampled behavior beyond those documented capabilities.

Main entry points: [`Enemy.java`](https://github.com/kuyamoakel/dcit50-card-game/blob/main/Enemy.java) (Boss State), [`BattleEngine.java`](https://github.com/kuyamoakel/dcit50-card-game/blob/main/BattleEngine.java) (Battle Engine), [`Deck.java`](https://github.com/kuyamoakel/dcit50-card-game/blob/main/Deck.java) (Master Deck), [`Player.java`](https://github.com/kuyamoakel/dcit50-card-game/blob/main/Player.java) (Player State)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_match["Match Flow"]
  node_main["Game Setup<br/>[Main.java]"]
  node_difficulty["Difficulty Bosses<br/>[Difficulty.java]"]
  node_engine["Battle Engine<br/>[BattleEngine.java]"]
end

subgraph group_combat["Combat State"]
  node_player["Player State<br/>[Player.java]"]
  node_enemy["Boss State<br/>[Enemy.java]"]
end

subgraph group_cards["Card System"]
  node_deck["Master Deck<br/>[Deck.java]"]
  node_card["Card Base<br/>[Card.java]"]
  node_physical["Physical Cards<br/>[PhysicalCard.java]"]
  node_magic["Magic Cards<br/>[MagicCard.java]"]
  node_pure["Pure Cards<br/>[PureCard.java]"]
  node_buff["Buff Cards<br/>[BuffCard.java]"]
  node_demi["Demi Cards<br/>[DemiCard.java]"]
  node_infliction["Infliction Cards"]
end

node_player_actor(("Player"))

node_player_actor -->|"starts game"| node_main
node_main -->|"selects bosses"| node_difficulty
node_main -->|"starts battle"| node_engine
node_main -->|"creates deck"| node_deck
node_main -->|"creates hero"| node_player
node_difficulty -->|"provides bosses"| node_enemy
node_engine -->|"chooses boss"| node_enemy
node_engine -->|"draws cards"| node_deck
node_engine -->|"plays selected"| node_card
node_engine -->|"runs turns"| node_player
node_engine -->|"runs attacks"| node_enemy
node_deck -->|"builds pool"| node_physical
node_deck -->|"builds pool"| node_magic
node_deck -->|"builds pool"| node_pure
node_deck -->|"builds pool"| node_buff
node_deck -->|"builds pool"| node_demi
node_deck -->|"builds pool"| node_infliction
node_physical -->|"extends"| node_card
node_magic -->|"extends"| node_card
node_pure -->|"extends"| node_card
node_buff -->|"extends"| node_card
node_demi -->|"extends"| node_card
node_infliction -->|"extends"| node_card
node_physical -->|"spends mana"| node_player
node_physical -->|"deals damage"| node_enemy
node_magic -->|"heals, restores"| node_player
node_magic -->|"deals damage"| node_enemy
node_pure -->|"spends, harms"| node_player
node_pure -->|"deals damage"| node_enemy
node_buff -->|"boosts health"| node_player
node_buff -->|"reduces hand cost"| node_engine
node_demi -->|"percent damage"| node_enemy
node_infliction -->|"applies effect"| node_enemy
node_engine -->|"ticks effect"| node_enemy
node_enemy -->|"attacks"| node_player

click node_main "https://github.com/kuyamoakel/dcit50-card-game/blob/main/Main.java"
click node_difficulty "https://github.com/kuyamoakel/dcit50-card-game/blob/main/Difficulty.java"
click node_engine "https://github.com/kuyamoakel/dcit50-card-game/blob/main/BattleEngine.java"
click node_player "https://github.com/kuyamoakel/dcit50-card-game/blob/main/Player.java"
click node_enemy "https://github.com/kuyamoakel/dcit50-card-game/blob/main/Enemy.java"
click node_deck "https://github.com/kuyamoakel/dcit50-card-game/blob/main/Deck.java"
click node_card "https://github.com/kuyamoakel/dcit50-card-game/blob/main/Card.java"
click node_physical "https://github.com/kuyamoakel/dcit50-card-game/blob/main/PhysicalCard.java"
click node_magic "https://github.com/kuyamoakel/dcit50-card-game/blob/main/MagicCard.java"
click node_pure "https://github.com/kuyamoakel/dcit50-card-game/blob/main/PureCard.java"
click node_buff "https://github.com/kuyamoakel/dcit50-card-game/blob/main/BuffCard.java"
click node_demi "https://github.com/kuyamoakel/dcit50-card-game/blob/main/DemiCard.java"
click node_infliction "https://github.com/kuyamoakel/dcit50-card-game/blob/main/InflictionCard.java"

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_difficulty,node_engine toneBlue
class node_player,node_enemy toneAmber
class node_deck,node_card,node_physical,node_magic,node_pure,node_buff,node_demi,node_infliction toneMint
class node_player_actor toneIndigo
```

## Components

### Match Flow

- [Game Setup](https://github.com/kuyamoakel/dcit50-card-game/blob/main/Main.java): `Main.java`
- [Difficulty Bosses](https://github.com/kuyamoakel/dcit50-card-game/blob/main/Difficulty.java): `Difficulty.java`
- [Battle Engine](https://github.com/kuyamoakel/dcit50-card-game/blob/main/BattleEngine.java): `BattleEngine.java`

### Combat State

- [Player State](https://github.com/kuyamoakel/dcit50-card-game/blob/main/Player.java): `Player.java`
- [Boss State](https://github.com/kuyamoakel/dcit50-card-game/blob/main/Enemy.java): `Enemy.java`

### Card System

- [Master Deck](https://github.com/kuyamoakel/dcit50-card-game/blob/main/Deck.java): `Deck.java`
- [Card Base](https://github.com/kuyamoakel/dcit50-card-game/blob/main/Card.java): `Card.java`
- [Physical Cards](https://github.com/kuyamoakel/dcit50-card-game/blob/main/PhysicalCard.java): `PhysicalCard.java`
- [Magic Cards](https://github.com/kuyamoakel/dcit50-card-game/blob/main/MagicCard.java): `MagicCard.java`
- [Pure Cards](https://github.com/kuyamoakel/dcit50-card-game/blob/main/PureCard.java): `PureCard.java`
- [Buff Cards](https://github.com/kuyamoakel/dcit50-card-game/blob/main/BuffCard.java): `BuffCard.java`
- [Demi Cards](https://github.com/kuyamoakel/dcit50-card-game/blob/main/DemiCard.java): `DemiCard.java`
- [Infliction Cards](https://github.com/kuyamoakel/dcit50-card-game/blob/main/InflictionCard.java): `InflictionCard.java`

### Other components

- **Player**

## Connections

- Player → Game Setup: starts game (evidence: `Main.java`)
- Game Setup → Difficulty Bosses: selects bosses (evidence: `Main.java`)
- Game Setup → Battle Engine: starts battle (evidence: `Main.java`)
- Game Setup → Master Deck: creates deck (evidence: `Main.java`)
- Game Setup → Player State: creates hero (evidence: `Main.java`)
- Difficulty Bosses → Boss State: provides bosses (evidence: `Difficulty.java`)
- Battle Engine → Boss State: chooses boss (evidence: `BattleEngine.java`)
- Battle Engine → Master Deck: draws cards (evidence: `BattleEngine.java`)
- Battle Engine → Card Base: plays selected (evidence: `BattleEngine.java`)
- Battle Engine → Player State: runs turns (evidence: `BattleEngine.java`)
- Battle Engine → Boss State: runs attacks (evidence: `BattleEngine.java`)
- Master Deck → Physical Cards: builds pool (evidence: `Deck.java`)
- Master Deck → Magic Cards: builds pool (evidence: `Deck.java`)
- Master Deck → Pure Cards: builds pool (evidence: `Deck.java`)
- Master Deck → Buff Cards: builds pool (evidence: `Deck.java`)
- Master Deck → Demi Cards: builds pool (evidence: `Deck.java`)
- Master Deck → Infliction Cards: builds pool (evidence: `Deck.java`)
- Physical Cards → Card Base: extends (evidence: `PhysicalCard.java`)
- Magic Cards → Card Base: extends (evidence: `MagicCard.java`)
- Pure Cards → Card Base: extends (evidence: `PureCard.java`)
- Buff Cards → Card Base: extends (evidence: `BuffCard.java`)
- Demi Cards → Card Base: extends (evidence: `DemiCard.java`)
- Infliction Cards → Card Base: extends (evidence: `InflictionCard.java`)
- Physical Cards → Player State: spends mana (evidence: `PhysicalCard.java`)
- Physical Cards → Boss State: deals damage (evidence: `PhysicalCard.java`)
- Magic Cards → Player State: heals, restores (evidence: `MagicCard.java`)
- Magic Cards → Boss State: deals damage (evidence: `MagicCard.java`)
- Pure Cards → Player State: spends, harms (evidence: `PureCard.java`)
- Pure Cards → Boss State: deals damage (evidence: `PureCard.java`)
- Buff Cards → Player State: boosts health (evidence: `BuffCard.java`)
- Buff Cards → Battle Engine: reduces hand cost (evidence: `BuffCard.java`)
- Demi Cards → Boss State: percent damage (evidence: `DemiCard.java`)
- Infliction Cards → Boss State: applies effect (evidence: `InflictionCard.java`)
- Battle Engine → Boss State: ticks effect (evidence: `BattleEngine.java`)
- Boss State → Player State: attacks (evidence: `Enemy.java`)
