# joemorningstarr/complexity-casino-final1 architecture

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

- Interactive diagram: https://gitdiagram.com/joemorningstarr/complexity-casino-final1
- Repository: https://github.com/joemorningstarr/complexity-casino-final1

## Overview

Complexity Casino is a browser-based retro game for learning algorithm analysis. The main user workflow is to enter the casino, interact with a game table, configure a round, and play; the app also manages chips, progress, services, and session-log export. The README and file tree identify three game experiences, but the sampled app excerpt does not show their launch destinations or game-page internals, so those links are marked unverified. Evidence is limited to the README and partial app.js excerpts.

Main entry points: [`app.js`](https://github.com/joemorningstarr/complexity-casino-final1/blob/main/app.js) (Casino Controller), [`index.html`](https://github.com/joemorningstarr/complexity-casino-final1/blob/main/index.html) (Casino Interface), [`games/balance_the_house.html`](https://github.com/joemorningstarr/complexity-casino-final1/blob/main/games/balance_the_house.html) (Balance the House), [`games/divide_conquer_temple.html`](https://github.com/joemorningstarr/complexity-casino-final1/blob/main/games/divide_conquer_temple.html) (Divide Conquer Temple)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_casino["Casino Hub"]
  node_shell["Casino Interface<br/>[index.html]"]
  node_controller["Casino Controller<br/>[app.js]"]
  node_rounds["Rounds and Economy<br/>[app.js]"]
  node_progress["Progress and Logs<br/>[app.js]"]
  node_services["Services and Boosts<br/>[app.js]"]
end

subgraph group_games["Learning Games"]
  node_balance["Balance the House"]
  node_temple["Divide Conquer Temple"]
  node_pathfinding["Pathfinding Lab"]
end

subgraph group_media["Game Media"]
  node_assets["Game Assets"]
  node_music["Casino Music"]
end

node_player(("Player"))

node_player -->|"opens"| node_shell
node_shell -->|"provides controls"| node_controller
node_player -->|"starts casino"| node_controller
node_controller -->|"manages rounds"| node_rounds
node_controller -->|"updates progress"| node_progress
node_controller -->|"handles services"| node_services
node_controller -.->|"launches game"| node_balance
node_controller -.->|"launches game"| node_temple
node_controller -.->|"launches game"| node_pathfinding
node_shell -.->|"uses visuals"| node_assets
node_controller -.->|"controls music"| node_music

click node_shell "https://github.com/joemorningstarr/complexity-casino-final1/blob/main/index.html"
click node_controller "https://github.com/joemorningstarr/complexity-casino-final1/blob/main/app.js"
click node_rounds "https://github.com/joemorningstarr/complexity-casino-final1/blob/main/app.js"
click node_progress "https://github.com/joemorningstarr/complexity-casino-final1/blob/main/app.js"
click node_services "https://github.com/joemorningstarr/complexity-casino-final1/blob/main/app.js"
click node_balance "https://github.com/joemorningstarr/complexity-casino-final1/blob/main/games/balance_the_house.html"
click node_temple "https://github.com/joemorningstarr/complexity-casino-final1/blob/main/games/divide_conquer_temple.html"
click node_pathfinding "https://github.com/joemorningstarr/complexity-casino-final1/blob/main/games/pathfinding_lab.html"
click node_assets "https://github.com/joemorningstarr/complexity-casino-final1/tree/main/assets"
click node_music "https://github.com/joemorningstarr/complexity-casino-final1/tree/main/assets/sounds/music"

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_shell,node_controller,node_rounds,node_progress,node_services toneBlue
class node_balance,node_temple,node_pathfinding toneAmber
class node_assets,node_music toneMint
class node_player toneIndigo
```

## Components

### Casino Hub

- [Casino Interface](https://github.com/joemorningstarr/complexity-casino-final1/blob/main/index.html): `index.html`
- [Casino Controller](https://github.com/joemorningstarr/complexity-casino-final1/blob/main/app.js): `app.js`
- [Rounds and Economy](https://github.com/joemorningstarr/complexity-casino-final1/blob/main/app.js): `app.js`
- [Progress and Logs](https://github.com/joemorningstarr/complexity-casino-final1/blob/main/app.js): `app.js`
- [Services and Boosts](https://github.com/joemorningstarr/complexity-casino-final1/blob/main/app.js): `app.js`

### Learning Games

- [Balance the House](https://github.com/joemorningstarr/complexity-casino-final1/blob/main/games/balance_the_house.html): `games/balance_the_house.html`
- [Divide Conquer Temple](https://github.com/joemorningstarr/complexity-casino-final1/blob/main/games/divide_conquer_temple.html): `games/divide_conquer_temple.html`
- [Pathfinding Lab](https://github.com/joemorningstarr/complexity-casino-final1/blob/main/games/pathfinding_lab.html): `games/pathfinding_lab.html`

### Game Media

- [Game Assets](https://github.com/joemorningstarr/complexity-casino-final1/tree/main/assets): `assets`
- [Casino Music](https://github.com/joemorningstarr/complexity-casino-final1/tree/main/assets/sounds/music): `assets/sounds/music`

### Other components

- **Player**

## Connections

- Player → Casino Interface: opens (evidence: `README.md`)
- Casino Interface → Casino Controller: provides controls (evidence: `app.js`)
- Player → Casino Controller: starts casino (evidence: `app.js`)
- Casino Controller → Rounds and Economy: manages rounds (evidence: `app.js`)
- Casino Controller → Progress and Logs: updates progress (evidence: `app.js`)
- Casino Controller → Services and Boosts: handles services (evidence: `app.js`)
- Casino Controller → Balance the House: launches game
- Casino Controller → Divide Conquer Temple: launches game
- Casino Controller → Pathfinding Lab: launches game
- Casino Interface → Game Assets: uses visuals
- Casino Controller → Casino Music: controls music
