# joshuajoelb/crumbs_and_candy architecture

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

- Interactive diagram: https://gitdiagram.com/joshuajoelb/crumbs_and_candy
- Repository: https://github.com/joshuajoelb/crumbs_and_candy

## Overview

Crumbs & Candy is a 3D escape adventure combining exploration, card-based combat, and resource management. The documented journey moves from the Witch’s house through enemy encounters, a blacksmith, a shop, and a campfire to a final boss and exit. The graph preserves those stages and the visible combat/resource subsystems. Source excerpts were unavailable, so relationships are limited to the README’s documented route and gameplay capabilities; implementation-level calls and data flow cannot be verified.

Main entry points: [`Assets/Scenes/Scarecrow.unity`](https://github.com/joshuajoelb/crumbs_and_candy/blob/master/Assets/Scenes/Scarecrow.unity) (Enemy Encounters), [`Assets/Scenes/WitchHouse.unity`](https://github.com/joshuajoelb/crumbs_and_candy/blob/master/Assets/Scenes/WitchHouse.unity) (Witch House), [`Assets/Scenes/Blacksmith.unity`](https://github.com/joshuajoelb/crumbs_and_candy/blob/master/Assets/Scenes/Blacksmith.unity) (Blacksmith), [`Assets/Scenes/Shop.unity`](https://github.com/joshuajoelb/crumbs_and_candy/blob/master/Assets/Scenes/Shop.unity) (Shop)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_journey["Escape Journey"]
  node_witch_house["Witch House<br/>[WitchHouse.unity]"]
  node_enemy_encounters["Enemy Encounters<br/>[Scarecrow.unity]"]
  node_blacksmith["Blacksmith<br/>[Blacksmith.unity]"]
  node_shop["Shop<br/>[Shop.unity]"]
  node_campfire["Campfire<br/>[Campfire.unity]"]
  node_final_boss["Final Boss<br/>[BattleScene.unity]"]
  node_exit["Freedom"]
end

subgraph group_combat["Card Combat"]
  node_card_battle["Card Battle<br/>[BattleManager.cs]"]
  node_card_flow["Card Flow<br/>[CardFlow.cs]"]
  node_card_data["Card Definitions<br/>[CardData.cs]"]
  node_enemy_data["Enemy Definitions<br/>[EnemyData.cs]"]
end

subgraph group_world["World Systems"]
  node_exploration["Exploration"]
  node_navigation["Location Transitions<br/>[DoorExit.cs]"]
end

subgraph group_resources["Player Resources"]
  node_player_profile["Player Profile<br/>[PlayerProfile.cs]"]
  node_player_stats["Player Stats<br/>[PlayerStats.cs]"]
end

node_player(("Player"))

node_player -->|"begins escape"| node_witch_house
node_witch_house -->|"route continues"| node_enemy_encounters
node_enemy_encounters -->|"route continues"| node_blacksmith
node_blacksmith -->|"route continues"| node_shop
node_shop -->|"branching path"| node_enemy_encounters
node_enemy_encounters -->|"route continues"| node_campfire
node_campfire -->|"route continues"| node_final_boss
node_final_boss -->|"escape reaches"| node_exit
node_player -->|"explores world"| node_exploration
node_player -->|"uses card combat"| node_card_battle
node_player -->|"manages resources"| node_player_profile

click node_witch_house "https://github.com/joshuajoelb/crumbs_and_candy/blob/master/Assets/Scenes/WitchHouse.unity"
click node_enemy_encounters "https://github.com/joshuajoelb/crumbs_and_candy/blob/master/Assets/Scenes/Scarecrow.unity"
click node_blacksmith "https://github.com/joshuajoelb/crumbs_and_candy/blob/master/Assets/Scenes/Blacksmith.unity"
click node_shop "https://github.com/joshuajoelb/crumbs_and_candy/blob/master/Assets/Scenes/Shop.unity"
click node_campfire "https://github.com/joshuajoelb/crumbs_and_candy/blob/master/Assets/Scenes/Campfire.unity"
click node_final_boss "https://github.com/joshuajoelb/crumbs_and_candy/blob/master/Assets/Scenes/BattleScene.unity"
click node_card_battle "https://github.com/joshuajoelb/crumbs_and_candy/blob/master/Assets/Script/BattleManager.cs"
click node_card_flow "https://github.com/joshuajoelb/crumbs_and_candy/blob/master/Assets/Script/CardFlow.cs"
click node_card_data "https://github.com/joshuajoelb/crumbs_and_candy/blob/master/Assets/Script/CardData.cs"
click node_enemy_data "https://github.com/joshuajoelb/crumbs_and_candy/blob/master/Assets/Script/EnemyScript/EnemyData.cs"
click node_exploration "https://github.com/joshuajoelb/crumbs_and_candy/blob/master/Assets/Scenes/ExplorationScene.unity"
click node_navigation "https://github.com/joshuajoelb/crumbs_and_candy/blob/master/Assets/Scenes/Scripts/DoorExit.cs"
click node_player_profile "https://github.com/joshuajoelb/crumbs_and_candy/blob/master/Assets/Script/PlayerProfile.cs"
click node_player_stats "https://github.com/joshuajoelb/crumbs_and_candy/blob/master/Assets/Scenes/misc/PlayerStats.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_witch_house,node_enemy_encounters,node_blacksmith,node_shop,node_campfire,node_final_boss,node_exit toneBlue
class node_card_battle,node_card_flow,node_card_data,node_enemy_data toneAmber
class node_exploration,node_navigation toneMint
class node_player_profile,node_player_stats toneRose
class node_player toneIndigo
```

## Components

### Escape Journey

- [Witch House](https://github.com/joshuajoelb/crumbs_and_candy/blob/master/Assets/Scenes/WitchHouse.unity): `Assets/Scenes/WitchHouse.unity`
- [Enemy Encounters](https://github.com/joshuajoelb/crumbs_and_candy/blob/master/Assets/Scenes/Scarecrow.unity): `Assets/Scenes/Scarecrow.unity`
- [Blacksmith](https://github.com/joshuajoelb/crumbs_and_candy/blob/master/Assets/Scenes/Blacksmith.unity): `Assets/Scenes/Blacksmith.unity`
- [Shop](https://github.com/joshuajoelb/crumbs_and_candy/blob/master/Assets/Scenes/Shop.unity): `Assets/Scenes/Shop.unity`
- [Campfire](https://github.com/joshuajoelb/crumbs_and_candy/blob/master/Assets/Scenes/Campfire.unity): `Assets/Scenes/Campfire.unity`
- [Final Boss](https://github.com/joshuajoelb/crumbs_and_candy/blob/master/Assets/Scenes/BattleScene.unity): `Assets/Scenes/BattleScene.unity`
- **Freedom**

### Card Combat

- [Card Battle](https://github.com/joshuajoelb/crumbs_and_candy/blob/master/Assets/Script/BattleManager.cs): `Assets/Script/BattleManager.cs`
- [Card Flow](https://github.com/joshuajoelb/crumbs_and_candy/blob/master/Assets/Script/CardFlow.cs): `Assets/Script/CardFlow.cs`
- [Card Definitions](https://github.com/joshuajoelb/crumbs_and_candy/blob/master/Assets/Script/CardData.cs): `Assets/Script/CardData.cs`
- [Enemy Definitions](https://github.com/joshuajoelb/crumbs_and_candy/blob/master/Assets/Script/EnemyScript/EnemyData.cs): `Assets/Script/EnemyScript/EnemyData.cs`

### World Systems

- [Exploration](https://github.com/joshuajoelb/crumbs_and_candy/blob/master/Assets/Scenes/ExplorationScene.unity): `Assets/Scenes/ExplorationScene.unity`
- [Location Transitions](https://github.com/joshuajoelb/crumbs_and_candy/blob/master/Assets/Scenes/Scripts/DoorExit.cs): `Assets/Scenes/Scripts/DoorExit.cs`

### Player Resources

- [Player Profile](https://github.com/joshuajoelb/crumbs_and_candy/blob/master/Assets/Script/PlayerProfile.cs): `Assets/Script/PlayerProfile.cs`
- [Player Stats](https://github.com/joshuajoelb/crumbs_and_candy/blob/master/Assets/Scenes/misc/PlayerStats.cs): `Assets/Scenes/misc/PlayerStats.cs`

### Other components

- **Player**

## Connections

- Player → Witch House: begins escape (evidence: `README.md`)
- Witch House → Enemy Encounters: route continues (evidence: `README.md`)
- Enemy Encounters → Blacksmith: route continues (evidence: `README.md`)
- Blacksmith → Shop: route continues (evidence: `README.md`)
- Shop → Enemy Encounters: branching path (evidence: `README.md`)
- Enemy Encounters → Campfire: route continues (evidence: `README.md`)
- Campfire → Final Boss: route continues (evidence: `README.md`)
- Final Boss → Freedom: escape reaches (evidence: `README.md`)
- Player → Exploration: explores world (evidence: `README.md`)
- Player → Card Battle: uses card combat (evidence: `README.md`)
- Player → Player Profile: manages resources (evidence: `README.md`)
