# jinjooyoung/dual-duel architecture

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

- Interactive diagram: https://gitdiagram.com/jinjooyoung/dual-duel
- Repository: https://github.com/jinjooyoung/dual-duel

## Overview

DUAL DUEL is a Unity turn-based card-placement deckbuilding game. The documented core loop draws from one shared deck, lets the player assign cards across allied and enemy slots, then resolves those slots in order to create tactical chains. The tree shows related battle and card scripts plus generated content, but no source excerpts were provided, so the paths identify likely implementation components rather than verified calls. Relationships below are limited to the README’s gameplay description; other gameplay subsystems are not inferred.

Main entry points: [`Assets/Scripts/Card/BattleSlot.cs`](https://github.com/jinjooyoung/dual-duel/blob/main/Assets/Scripts/Card/BattleSlot.cs) (Slot Timeline), [`Assets/Scripts/Manager/Battle/BattleCardManager.cs`](https://github.com/jinjooyoung/dual-duel/blob/main/Assets/Scripts/Manager/Battle/BattleCardManager.cs) (Shared Deck), [`Assets/Scripts/Manager/Battle/BattleManager.cs`](https://github.com/jinjooyoung/dual-duel/blob/main/Assets/Scripts/Manager/Battle/BattleManager.cs) (Battle Resolution), [`Assets/Scripts/Card/CardInstance.cs`](https://github.com/jinjooyoung/dual-duel/blob/main/Assets/Scripts/Card/CardInstance.cs) (Card Instance)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_battle["Battle Flow"]
  node_shared_deck["Shared Deck"]
  node_slot_timeline["Slot Timeline<br/>[BattleSlot.cs]"]
  node_battle_resolution["Battle Resolution<br/>[BattleManager.cs]"]
end

subgraph group_content["Game Content"]
  node_card_instance["Card Instance<br/>[CardInstance.cs]"]
  node_card_definitions["Card Definitions<br/>[CardSO.cs]"]
  node_card_database[("Card Database<br/>[CardDatabase.asset]")]
end

subgraph group_presentation["Game Presentation"]
  node_battle_scene["Battle Scene<br/>[BattleScene.unity]"]
  node_card_display["Card Display<br/>[CardDisplay.cs]"]
end

node_player(("Player"))

node_player -->|"draws from"| node_shared_deck
node_player -->|"assigns cards"| node_slot_timeline
node_shared_deck -->|"shares cards"| node_slot_timeline
node_slot_timeline -->|"resolves in order"| node_battle_resolution
node_battle_resolution -.->|"shown in"| node_battle_scene
node_card_definitions -.->|"stored as"| node_card_database
node_card_instance -.->|"displayed by"| node_card_display

click node_shared_deck "https://github.com/jinjooyoung/dual-duel/blob/main/Assets/Scripts/Manager/Battle/BattleCardManager.cs"
click node_slot_timeline "https://github.com/jinjooyoung/dual-duel/blob/main/Assets/Scripts/Card/BattleSlot.cs"
click node_battle_resolution "https://github.com/jinjooyoung/dual-duel/blob/main/Assets/Scripts/Manager/Battle/BattleManager.cs"
click node_card_instance "https://github.com/jinjooyoung/dual-duel/blob/main/Assets/Scripts/Card/CardInstance.cs"
click node_card_definitions "https://github.com/jinjooyoung/dual-duel/blob/main/Assets/Scripts/Data/SO/CardSO.cs"
click node_card_database "https://github.com/jinjooyoung/dual-duel/blob/main/Assets/Data/Generated/Cards/CardDatabase.asset"
click node_battle_scene "https://github.com/jinjooyoung/dual-duel/blob/main/Assets/Scenes/BattleScene.unity"
click node_card_display "https://github.com/jinjooyoung/dual-duel/blob/main/Assets/Scripts/Card/CardDisplay.cs"

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_shared_deck,node_slot_timeline,node_battle_resolution toneBlue
class node_card_instance,node_card_definitions,node_card_database toneAmber
class node_battle_scene,node_card_display toneMint
class node_player toneIndigo
```

## Components

### Battle Flow

- [Shared Deck](https://github.com/jinjooyoung/dual-duel/blob/main/Assets/Scripts/Manager/Battle/BattleCardManager.cs): `Assets/Scripts/Manager/Battle/BattleCardManager.cs`
- [Slot Timeline](https://github.com/jinjooyoung/dual-duel/blob/main/Assets/Scripts/Card/BattleSlot.cs): `Assets/Scripts/Card/BattleSlot.cs`
- [Battle Resolution](https://github.com/jinjooyoung/dual-duel/blob/main/Assets/Scripts/Manager/Battle/BattleManager.cs): `Assets/Scripts/Manager/Battle/BattleManager.cs`

### Game Content

- [Card Instance](https://github.com/jinjooyoung/dual-duel/blob/main/Assets/Scripts/Card/CardInstance.cs): `Assets/Scripts/Card/CardInstance.cs`
- [Card Definitions](https://github.com/jinjooyoung/dual-duel/blob/main/Assets/Scripts/Data/SO/CardSO.cs): `Assets/Scripts/Data/SO/CardSO.cs`
- [Card Database](https://github.com/jinjooyoung/dual-duel/blob/main/Assets/Data/Generated/Cards/CardDatabase.asset): `Assets/Data/Generated/Cards/CardDatabase.asset`

### Game Presentation

- [Battle Scene](https://github.com/jinjooyoung/dual-duel/blob/main/Assets/Scenes/BattleScene.unity): `Assets/Scenes/BattleScene.unity`
- [Card Display](https://github.com/jinjooyoung/dual-duel/blob/main/Assets/Scripts/Card/CardDisplay.cs): `Assets/Scripts/Card/CardDisplay.cs`

### Other components

- **Player**

## Connections

- Player → Shared Deck: draws from (evidence: `README.md`)
- Player → Slot Timeline: assigns cards (evidence: `README.md`)
- Shared Deck → Slot Timeline: shares cards (evidence: `README.md`)
- Slot Timeline → Battle Resolution: resolves in order (evidence: `README.md`)
- Battle Resolution → Battle Scene: shown in
- Card Definitions → Card Database: stored as
- Card Instance → Card Display: displayed by
