# eugene234466/unchained architecture

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

- Interactive diagram: https://gitdiagram.com/eugene234466/unchained
- Repository: https://github.com/eugene234466/unchained

## Overview

UNCHAINED is a single-file, terminal-based pirate RPG. Its main player journey is room exploration, NPC interaction and item acquisition, turn-based battles, then choices that determine the island’s and ocean’s fate. The README also describes cinematic pacing and multi-phase bosses. The source is only partially excerpted, so unsampled command handling and several documented features are represented without asserting their internal call paths.

Main entry points: [`unchained.py`](https://github.com/eugene234466/unchained/blob/main/unchained.py) (Command Game)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_world["World and Story"]
  node_player["Player State<br/>[unchained.py]"]
  node_rooms["Room Exploration<br/>[unchained.py]"]
  node_items["Items and Gear<br/>[unchained.py]"]
  node_progression["Story Progression<br/>[unchained.py]"]
end

subgraph group_interaction["Player Interaction"]
  node_npcs["NPC Dialogue<br/>[unchained.py]"]
  node_command_game["Command Game<br/>[unchained.py]"]
  node_cinematic["Cinematic Output<br/>[unchained.py]"]
end

subgraph group_combat["Combat"]
  node_combat_engine["Turn-Based Combat<br/>[unchained.py]"]
  node_boss_ai["Boss AI<br/>[unchained.py]"]
end

node_player_actor(("Player"))

node_player_actor -->|"enters commands"| node_command_game
node_command_game -.->|"explores rooms"| node_rooms
node_command_game -.->|"chooses dialogue"| node_npcs
node_command_game -.->|"chooses actions"| node_combat_engine
node_command_game -.->|"makes choices"| node_progression
node_rooms -->|"reads location"| node_player
node_rooms -->|"looks up NPC"| node_npcs
node_npcs -->|"checks and applies"| node_player
node_combat_engine -->|"updates combat state"| node_player
node_combat_engine -->|"dispatches AI"| node_boss_ai
node_command_game -.->|"prints narration"| node_cinematic
node_player -.->|"gates outcomes"| node_progression
node_items -.->|"enables objectives"| node_progression

click node_player "https://github.com/eugene234466/unchained/blob/main/unchained.py"
click node_rooms "https://github.com/eugene234466/unchained/blob/main/unchained.py"
click node_items "https://github.com/eugene234466/unchained/blob/main/unchained.py"
click node_progression "https://github.com/eugene234466/unchained/blob/main/unchained.py"
click node_npcs "https://github.com/eugene234466/unchained/blob/main/unchained.py"
click node_command_game "https://github.com/eugene234466/unchained/blob/main/unchained.py"
click node_cinematic "https://github.com/eugene234466/unchained/blob/main/unchained.py"
click node_combat_engine "https://github.com/eugene234466/unchained/blob/main/unchained.py"
click node_boss_ai "https://github.com/eugene234466/unchained/blob/main/unchained.py"

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_player,node_rooms,node_items,node_progression toneBlue
class node_npcs,node_command_game,node_cinematic toneAmber
class node_combat_engine,node_boss_ai toneMint
class node_player_actor toneIndigo
```

## Components

### World and Story

- [Player State](https://github.com/eugene234466/unchained/blob/main/unchained.py): `unchained.py`
- [Room Exploration](https://github.com/eugene234466/unchained/blob/main/unchained.py): `unchained.py`
- [Items and Gear](https://github.com/eugene234466/unchained/blob/main/unchained.py): `unchained.py`
- [Story Progression](https://github.com/eugene234466/unchained/blob/main/unchained.py): `unchained.py`

### Player Interaction

- [NPC Dialogue](https://github.com/eugene234466/unchained/blob/main/unchained.py): `unchained.py`
- [Command Game](https://github.com/eugene234466/unchained/blob/main/unchained.py): `unchained.py`
- [Cinematic Output](https://github.com/eugene234466/unchained/blob/main/unchained.py): `unchained.py`

### Combat

- [Turn-Based Combat](https://github.com/eugene234466/unchained/blob/main/unchained.py): `unchained.py`
- [Boss AI](https://github.com/eugene234466/unchained/blob/main/unchained.py): `unchained.py`

### Other components

- **Player**

## Connections

- Player → Command Game: enters commands (evidence: `README.md`)
- Command Game → Room Exploration: explores rooms (evidence: `unchained.py`)
- Command Game → NPC Dialogue: chooses dialogue (evidence: `unchained.py`)
- Command Game → Turn-Based Combat: chooses actions (evidence: `unchained.py`)
- Command Game → Story Progression: makes choices (evidence: `unchained.py`)
- Room Exploration → Player State: reads location (evidence: `unchained.py`)
- Room Exploration → NPC Dialogue: looks up NPC (evidence: `unchained.py`)
- NPC Dialogue → Player State: checks and applies (evidence: `unchained.py`)
- Turn-Based Combat → Player State: updates combat state (evidence: `unchained.py`)
- Turn-Based Combat → Boss AI: dispatches AI (evidence: `unchained.py`)
- Command Game → Cinematic Output: prints narration (evidence: `unchained.py`)
- Player State → Story Progression: gates outcomes (evidence: `unchained.py`)
- Items and Gear → Story Progression: enables objectives (evidence: `unchained.py`)
