# blakedalmas/python architecture

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

- Interactive diagram: https://gitdiagram.com/blakedalmas/python
- Repository: https://github.com/blakedalmas/python

## Overview

This repository contains two Arcade games. The documented main game, The Great Skeleton War, launches through lab_12.py: players configure and start a defense, build towers across three ages, fight escalating skeleton waves, and develop a wizard through spells and skills. Most game orchestration is concentrated in that file, while gamedata.py and player.py implement combat entities and abilities. Dungeon Game is a separate, largely monolithic dungeon-combat game with high-score persistence. Some subsystems are documented but not fully sampled, so their internal connections are omitted.

Main entry points: [`The Great Skeleton War/lab_12.py`](https://github.com/blakedalmas/python/blob/master/The%20Great%20Skeleton%20War/lab_12.py) (Game Window), [`The Great Skeleton War/globalvars.py`](https://github.com/blakedalmas/python/blob/master/The%20Great%20Skeleton%20War/globalvars.py) (Shared Game State), [`The Great Skeleton War/player.py`](https://github.com/blakedalmas/python/blob/master/The%20Great%20Skeleton%20War/player.py) (Wizard Combat), [`The Great Skeleton War/skills_menu.py`](https://github.com/blakedalmas/python/blob/master/The%20Great%20Skeleton%20War/skills_menu.py) (Skill Tree)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_launch["Game Entry"]
  node_war_app["Game Window<br/>[lab_12.py]"]
end

subgraph group_warplay["Skeleton War"]
  node_map_waves["Maps &amp; Waves<br/>[lab_12.py]"]
  node_tower_economy["Tower Defense<br/>[lab_12.py]"]
  node_combat_entities["Enemies &amp; Towers<br/>[gamedata.py]"]
  node_war_state["Shared Game State<br/>[globalvars.py]"]
  node_sound_cache["Sound Cache<br/>[tempvars.py]"]
  node_key_config["Key Bindings<br/>[config.txt]"]
end

subgraph group_progression["Wizard Progression"]
  node_wizard["Wizard Combat<br/>[player.py]"]
  node_skill_tree["Skill Tree<br/>[skills_menu.py]"]
  node_spell_catalog["Spell Catalog<br/>[spell_data.py]"]
end

subgraph group_dungeon["Dungeon Game"]
  node_dungeon_app["Dungeon Runtime<br/>[game.py]"]
  node_high_scores["High Scores<br/>[scores.txt]"]
end

node_player_actor(("Player"))
node_dungeon_actor(("Player"))

node_player_actor -->|"plays"| node_war_app
node_war_app -->|"generates"| node_map_waves
node_war_app -->|"creates towers"| node_tower_economy
node_war_app -->|"uses entities"| node_combat_entities
node_war_app -->|"uses player"| node_wizard
node_war_app -->|"opens menu"| node_skill_tree
node_war_app -->|"uses shared state"| node_war_state
node_war_app -->|"writes bindings"| node_key_config
node_combat_entities -->|"reads enemy state"| node_war_state
node_wizard -->|"updates state"| node_war_state
node_wizard -->|"creates effects"| node_combat_entities
node_wizard -->|"uses spell data"| node_spell_catalog
node_skill_tree -->|"builds skills from"| node_spell_catalog
node_skill_tree -->|"reads player points"| node_war_state
node_war_state -->|"caches sound"| node_sound_cache
node_dungeon_actor -.->|"plays"| node_dungeon_app
node_dungeon_app -->|"reads and writes"| node_high_scores

click node_war_app "https://github.com/blakedalmas/python/blob/master/The%20Great%20Skeleton%20War/lab_12.py"
click node_map_waves "https://github.com/blakedalmas/python/blob/master/The%20Great%20Skeleton%20War/lab_12.py"
click node_tower_economy "https://github.com/blakedalmas/python/blob/master/The%20Great%20Skeleton%20War/lab_12.py"
click node_combat_entities "https://github.com/blakedalmas/python/blob/master/The%20Great%20Skeleton%20War/gamedata.py"
click node_wizard "https://github.com/blakedalmas/python/blob/master/The%20Great%20Skeleton%20War/player.py"
click node_skill_tree "https://github.com/blakedalmas/python/blob/master/The%20Great%20Skeleton%20War/skills_menu.py"
click node_spell_catalog "https://github.com/blakedalmas/python/blob/master/The%20Great%20Skeleton%20War/spell_data.py"
click node_war_state "https://github.com/blakedalmas/python/blob/master/The%20Great%20Skeleton%20War/globalvars.py"
click node_sound_cache "https://github.com/blakedalmas/python/blob/master/The%20Great%20Skeleton%20War/tempvars.py"
click node_key_config "https://github.com/blakedalmas/python/blob/master/The%20Great%20Skeleton%20War/config.txt"
click node_dungeon_app "https://github.com/blakedalmas/python/blob/master/Dungeon%20Game/game.py"
click node_high_scores "https://github.com/blakedalmas/python/blob/master/Dungeon%20Game/scores.txt"

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_war_app toneBlue
class node_map_waves,node_tower_economy,node_combat_entities,node_war_state,node_sound_cache,node_key_config toneAmber
class node_wizard,node_skill_tree,node_spell_catalog toneMint
class node_dungeon_app,node_high_scores toneRose
class node_player_actor,node_dungeon_actor toneIndigo
```

## Components

### Game Entry

- [Game Window](https://github.com/blakedalmas/python/blob/master/The%20Great%20Skeleton%20War/lab_12.py): `The Great Skeleton War/lab_12.py`

### Skeleton War

- [Maps & Waves](https://github.com/blakedalmas/python/blob/master/The%20Great%20Skeleton%20War/lab_12.py): `The Great Skeleton War/lab_12.py`
- [Tower Defense](https://github.com/blakedalmas/python/blob/master/The%20Great%20Skeleton%20War/lab_12.py): `The Great Skeleton War/lab_12.py`
- [Enemies & Towers](https://github.com/blakedalmas/python/blob/master/The%20Great%20Skeleton%20War/gamedata.py): `The Great Skeleton War/gamedata.py`
- [Shared Game State](https://github.com/blakedalmas/python/blob/master/The%20Great%20Skeleton%20War/globalvars.py): `The Great Skeleton War/globalvars.py`
- [Sound Cache](https://github.com/blakedalmas/python/blob/master/The%20Great%20Skeleton%20War/tempvars.py): `The Great Skeleton War/tempvars.py`
- [Key Bindings](https://github.com/blakedalmas/python/blob/master/The%20Great%20Skeleton%20War/config.txt): `The Great Skeleton War/config.txt`

### Wizard Progression

- [Wizard Combat](https://github.com/blakedalmas/python/blob/master/The%20Great%20Skeleton%20War/player.py): `The Great Skeleton War/player.py`
- [Skill Tree](https://github.com/blakedalmas/python/blob/master/The%20Great%20Skeleton%20War/skills_menu.py): `The Great Skeleton War/skills_menu.py`
- [Spell Catalog](https://github.com/blakedalmas/python/blob/master/The%20Great%20Skeleton%20War/spell_data.py): `The Great Skeleton War/spell_data.py`

### Dungeon Game

- [Dungeon Runtime](https://github.com/blakedalmas/python/blob/master/Dungeon%20Game/game.py): `Dungeon Game/game.py`
- [High Scores](https://github.com/blakedalmas/python/blob/master/Dungeon%20Game/scores.txt): `Dungeon Game/scores.txt`

### Other components

- **Player**
- **Player**

## Connections

- Player → Game Window: plays (evidence: `README.md`)
- Game Window → Maps & Waves: generates (evidence: `The Great Skeleton War/lab_12.py`)
- Game Window → Tower Defense: creates towers (evidence: `The Great Skeleton War/lab_12.py`)
- Game Window → Enemies & Towers: uses entities (evidence: `The Great Skeleton War/lab_12.py`)
- Game Window → Wizard Combat: uses player (evidence: `The Great Skeleton War/lab_12.py`)
- Game Window → Skill Tree: opens menu (evidence: `The Great Skeleton War/lab_12.py`)
- Game Window → Shared Game State: uses shared state (evidence: `The Great Skeleton War/lab_12.py`)
- Game Window → Key Bindings: writes bindings (evidence: `The Great Skeleton War/lab_12.py`)
- Enemies & Towers → Shared Game State: reads enemy state (evidence: `The Great Skeleton War/gamedata.py`)
- Wizard Combat → Shared Game State: updates state (evidence: `The Great Skeleton War/player.py`)
- Wizard Combat → Enemies & Towers: creates effects (evidence: `The Great Skeleton War/player.py`)
- Wizard Combat → Spell Catalog: uses spell data (evidence: `The Great Skeleton War/player.py`)
- Skill Tree → Spell Catalog: builds skills from (evidence: `The Great Skeleton War/skills_menu.py`)
- Skill Tree → Shared Game State: reads player points (evidence: `The Great Skeleton War/skills_menu.py`)
- Shared Game State → Sound Cache: caches sound (evidence: `The Great Skeleton War/globalvars.py`)
- Player → Dungeon Runtime: plays
- Dungeon Runtime → High Scores: reads and writes (evidence: `Dungeon Game/game.py`)
