# golden-husky/tour-de-lost architecture

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

- Interactive diagram: https://gitdiagram.com/golden-husky/tour-de-lost
- Repository: https://github.com/golden-husky/tour-de-lost

## Overview

Tour de Lost is a Java Swing/Java2D graph-algorithm learning game, but the README describes the repository as a compilable starter skeleton: playable movement, missions, algorithms, and levels are not implemented. The current path runs from launching the window through menu navigation to a demo graph and gameplay/lesson screens. Planned mission and algorithm stages are shown as unimplemented subsystems, not working runtime components. Relationships are limited to the shown source references and README; unsampled implementations are not inferred.

Main entry points: [`src/tourdelost/ui/GameWindow.java`](https://github.com/golden-husky/tour-de-lost/blob/main/src/tourdelost/ui/GameWindow.java) (Screen coordinator), [`src/tourdelost/ui/GraphMapPanel.java`](https://github.com/golden-husky/tour-de-lost/blob/main/src/tourdelost/ui/GraphMapPanel.java) (Graph map view), [`src/tourdelost/world/Graph.java`](https://github.com/golden-husky/tour-de-lost/blob/main/src/tourdelost/world/Graph.java) (Graph model), [`src/tourdelost/ui/GameplayShellPanel.java`](https://github.com/golden-husky/tour-de-lost/blob/main/src/tourdelost/ui/GameplayShellPanel.java) (Gameplay screen)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app_ui["Application UI"]
  node_main["Application entry<br/>[Main.java]"]
  node_window["Screen coordinator<br/>[GameWindow.java]"]
  node_title["Title and menu<br/>[GamePanel.java]"]
  node_screen_panels["Menu screens"]
  node_gameplay_ui["Gameplay screen"]
  node_map_ui["Graph map view<br/>[GraphMapPanel.java]"]
  node_lesson_ui["Lesson screen"]
  node_ui_helpers["UI assets and state"]
end

subgraph group_world["Graph World"]
  node_world_demo["Demo world<br/>[WorldDemo.java]"]
  node_graph["Graph model<br/>[Graph.java]"]
  node_node["Map nodes<br/>[Node.java]"]
  node_edge["Routes and links<br/>[Edge.java]"]
  node_player_state["Player movement<br/>[Player.java]"]
  node_move_record["Move history<br/>[MoveRecord.java]"]
end

subgraph group_learning["Game And Learning"]
  node_game_system["Levels and missions"]
  node_mission_rules["Mission rules"]
  node_algorithms["Graph algorithms"]
  node_lessons["Lessons and demos"]
  node_game_state["Gameplay view state"]
  node_lesson_state["Lesson view state"]
end

node_player(("Player"))

node_player -->|"launches"| node_main
node_main -->|"opens"| node_window
node_window -->|"creates"| node_title
node_window -->|"creates"| node_gameplay_ui
node_window -->|"creates"| node_lesson_ui
node_window -->|"registers"| node_screen_panels
node_window -->|"requests graph"| node_world_demo
node_title -->|"uses assets"| node_ui_helpers
node_gameplay_ui -->|"creates map"| node_map_ui
node_gameplay_ui -->|"displays state"| node_game_state
node_map_ui -->|"renders graph"| node_graph
node_map_ui -->|"renders nodes"| node_node
node_map_ui -->|"renders edges"| node_edge
node_map_ui -->|"uses sprites"| node_ui_helpers
node_lesson_ui -->|"shows graph"| node_map_ui
node_lesson_ui -->|"displays steps"| node_lesson_state
node_world_demo -->|"constructs"| node_graph
node_graph -->|"indexes"| node_node
node_graph -->|"indexes"| node_edge
node_world_demo -->|"checks moves"| node_player_state
node_player_state -->|"validates routes"| node_graph
node_player_state -->|"records moves"| node_move_record
node_game_system -.->|"planned rules"| node_mission_rules
node_game_system -.->|"planned challenge flow"| node_algorithms
node_algorithms -.->|"planned demonstrations"| node_lessons
node_gameplay_ui -.->|"planned gameplay data"| node_game_system

click node_main "https://github.com/golden-husky/tour-de-lost/blob/main/src/tourdelost/Main.java"
click node_window "https://github.com/golden-husky/tour-de-lost/blob/main/src/tourdelost/ui/GameWindow.java"
click node_title "https://github.com/golden-husky/tour-de-lost/blob/main/src/tourdelost/ui/GamePanel.java"
click node_screen_panels "https://github.com/golden-husky/tour-de-lost/tree/main/src/tourdelost/ui"
click node_gameplay_ui "https://github.com/golden-husky/tour-de-lost/blob/main/src/tourdelost/ui/GameplayShellPanel.java"
click node_map_ui "https://github.com/golden-husky/tour-de-lost/blob/main/src/tourdelost/ui/GraphMapPanel.java"
click node_lesson_ui "https://github.com/golden-husky/tour-de-lost/blob/main/src/tourdelost/ui/LessonShellPanel.java"
click node_ui_helpers "https://github.com/golden-husky/tour-de-lost/tree/main/src/tourdelost/ui"
click node_world_demo "https://github.com/golden-husky/tour-de-lost/blob/main/src/tourdelost/world/WorldDemo.java"
click node_graph "https://github.com/golden-husky/tour-de-lost/blob/main/src/tourdelost/world/Graph.java"
click node_node "https://github.com/golden-husky/tour-de-lost/blob/main/src/tourdelost/world/Node.java"
click node_edge "https://github.com/golden-husky/tour-de-lost/blob/main/src/tourdelost/world/Edge.java"
click node_player_state "https://github.com/golden-husky/tour-de-lost/blob/main/src/tourdelost/world/Player.java"
click node_move_record "https://github.com/golden-husky/tour-de-lost/blob/main/src/tourdelost/world/MoveRecord.java"
click node_game_system "https://github.com/golden-husky/tour-de-lost/tree/main/src/tourdelost/game"
click node_mission_rules "https://github.com/golden-husky/tour-de-lost/tree/main/src/tourdelost/game/mission"
click node_algorithms "https://github.com/golden-husky/tour-de-lost/tree/main/src/tourdelost/algorithm"
click node_lessons "https://github.com/golden-husky/tour-de-lost/tree/main/src/tourdelost/lesson"
click node_game_state "https://github.com/golden-husky/tour-de-lost/blob/main/src/tourdelost/ui/GameplayViewState.java"
click node_lesson_state "https://github.com/golden-husky/tour-de-lost/blob/main/src/tourdelost/ui/LessonViewState.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_window,node_title,node_screen_panels,node_gameplay_ui,node_map_ui,node_lesson_ui,node_ui_helpers toneBlue
class node_world_demo,node_graph,node_node,node_edge,node_player_state,node_move_record toneAmber
class node_game_system,node_mission_rules,node_algorithms,node_lessons,node_game_state,node_lesson_state toneMint
class node_player toneIndigo
```

## Components

### Application UI

- [Application entry](https://github.com/golden-husky/tour-de-lost/blob/main/src/tourdelost/Main.java): `src/tourdelost/Main.java`
- [Screen coordinator](https://github.com/golden-husky/tour-de-lost/blob/main/src/tourdelost/ui/GameWindow.java): `src/tourdelost/ui/GameWindow.java`
- [Title and menu](https://github.com/golden-husky/tour-de-lost/blob/main/src/tourdelost/ui/GamePanel.java): `src/tourdelost/ui/GamePanel.java`
- [Menu screens](https://github.com/golden-husky/tour-de-lost/tree/main/src/tourdelost/ui): `src/tourdelost/ui`
- [Gameplay screen](https://github.com/golden-husky/tour-de-lost/blob/main/src/tourdelost/ui/GameplayShellPanel.java): `src/tourdelost/ui/GameplayShellPanel.java`
- [Graph map view](https://github.com/golden-husky/tour-de-lost/blob/main/src/tourdelost/ui/GraphMapPanel.java): `src/tourdelost/ui/GraphMapPanel.java`
- [Lesson screen](https://github.com/golden-husky/tour-de-lost/blob/main/src/tourdelost/ui/LessonShellPanel.java): `src/tourdelost/ui/LessonShellPanel.java`
- [UI assets and state](https://github.com/golden-husky/tour-de-lost/tree/main/src/tourdelost/ui): `src/tourdelost/ui`

### Graph World

- [Demo world](https://github.com/golden-husky/tour-de-lost/blob/main/src/tourdelost/world/WorldDemo.java): `src/tourdelost/world/WorldDemo.java`
- [Graph model](https://github.com/golden-husky/tour-de-lost/blob/main/src/tourdelost/world/Graph.java): `src/tourdelost/world/Graph.java`
- [Map nodes](https://github.com/golden-husky/tour-de-lost/blob/main/src/tourdelost/world/Node.java): `src/tourdelost/world/Node.java`
- [Routes and links](https://github.com/golden-husky/tour-de-lost/blob/main/src/tourdelost/world/Edge.java): `src/tourdelost/world/Edge.java`
- [Player movement](https://github.com/golden-husky/tour-de-lost/blob/main/src/tourdelost/world/Player.java): `src/tourdelost/world/Player.java`
- [Move history](https://github.com/golden-husky/tour-de-lost/blob/main/src/tourdelost/world/MoveRecord.java): `src/tourdelost/world/MoveRecord.java`

### Game And Learning

- [Levels and missions](https://github.com/golden-husky/tour-de-lost/tree/main/src/tourdelost/game): `src/tourdelost/game`
- [Mission rules](https://github.com/golden-husky/tour-de-lost/tree/main/src/tourdelost/game/mission): `src/tourdelost/game/mission`
- [Graph algorithms](https://github.com/golden-husky/tour-de-lost/tree/main/src/tourdelost/algorithm): `src/tourdelost/algorithm`
- [Lessons and demos](https://github.com/golden-husky/tour-de-lost/tree/main/src/tourdelost/lesson): `src/tourdelost/lesson`
- [Gameplay view state](https://github.com/golden-husky/tour-de-lost/blob/main/src/tourdelost/ui/GameplayViewState.java): `src/tourdelost/ui/GameplayViewState.java`
- [Lesson view state](https://github.com/golden-husky/tour-de-lost/blob/main/src/tourdelost/ui/LessonViewState.java): `src/tourdelost/ui/LessonViewState.java`

### Other components

- **Player**

## Connections

- Player → Application entry: launches (evidence: `README.md`)
- Application entry → Screen coordinator: opens (evidence: `src/tourdelost/Main.java`)
- Screen coordinator → Title and menu: creates (evidence: `src/tourdelost/ui/GameWindow.java`)
- Screen coordinator → Gameplay screen: creates (evidence: `src/tourdelost/ui/GameWindow.java`)
- Screen coordinator → Lesson screen: creates (evidence: `src/tourdelost/ui/GameWindow.java`)
- Screen coordinator → Menu screens: registers (evidence: `src/tourdelost/ui/GameWindow.java`)
- Screen coordinator → Demo world: requests graph (evidence: `src/tourdelost/ui/GameWindow.java`)
- Title and menu → UI assets and state: uses assets (evidence: `src/tourdelost/ui/GamePanel.java`)
- Gameplay screen → Graph map view: creates map (evidence: `src/tourdelost/ui/GameplayShellPanel.java`)
- Gameplay screen → Gameplay view state: displays state (evidence: `src/tourdelost/ui/GameplayShellPanel.java`)
- Graph map view → Graph model: renders graph (evidence: `src/tourdelost/ui/GraphMapPanel.java`)
- Graph map view → Map nodes: renders nodes (evidence: `src/tourdelost/ui/GraphMapPanel.java`)
- Graph map view → Routes and links: renders edges (evidence: `src/tourdelost/ui/GraphMapPanel.java`)
- Graph map view → UI assets and state: uses sprites (evidence: `src/tourdelost/ui/GraphMapPanel.java`)
- Lesson screen → Graph map view: shows graph (evidence: `src/tourdelost/ui/LessonShellPanel.java`)
- Lesson screen → Lesson view state: displays steps (evidence: `src/tourdelost/ui/LessonShellPanel.java`)
- Demo world → Graph model: constructs (evidence: `src/tourdelost/world/WorldDemo.java`)
- Graph model → Map nodes: indexes (evidence: `src/tourdelost/world/Graph.java`)
- Graph model → Routes and links: indexes (evidence: `src/tourdelost/world/Graph.java`)
- Demo world → Player movement: checks moves (evidence: `src/tourdelost/world/WorldDemo.java`)
- Player movement → Graph model: validates routes (evidence: `src/tourdelost/world/Player.java`)
- Player movement → Move history: records moves (evidence: `src/tourdelost/world/Player.java`)
- Levels and missions → Mission rules: planned rules (evidence: `README.md`)
- Levels and missions → Graph algorithms: planned challenge flow (evidence: `README.md`)
- Graph algorithms → Lessons and demos: planned demonstrations (evidence: `README.md`)
- Gameplay screen → Levels and missions: planned gameplay data (evidence: `README.md`)
