# gotenten/project_p architecture

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

- Interactive diagram: https://gitdiagram.com/gotenten/project_p
- Repository: https://github.com/gotenten/project_p

## Overview

POUKEMON is a terminal team-battling game. Players choose a PvP or computer-opponent mode, build teams, then take turns attacking, switching, and resolving effects until a team is defeated; the game displays the outcome. The graph also preserves the model, skill, passive, status, and AI subsystems. Several modules were not excerpted, so uncertain internal links are omitted rather than inferred.

Main entry points: [`core/main.py`](https://github.com/gotenten/project_p/blob/main/core/main.py) (Game coordinator), [`core/battle.py`](https://github.com/gotenten/project_p/blob/main/core/battle.py) (Battle turns), [`systems/team_creation.py`](https://github.com/gotenten/project_p/blob/main/systems/team_creation.py) (Team creation), [`core/skills.py`](https://github.com/gotenten/project_p/blob/main/core/skills.py) (Skill behavior)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Game entry"]
  node_entry_screen["Start screen<br/>[start_screen.py]"]
  node_game_main["Game coordinator<br/>[main.py]"]
  node_team_creation["Team creation<br/>[team_creation.py]"]
end

subgraph group_battle["Battle runtime"]
  node_battle_engine["Battle turns<br/>[battle.py]"]
  node_team["Team state<br/>[team.py]"]
  node_computer_ai["Yoda AI"]
  node_ai_functions["AI functions<br/>[ai_function.py]"]
  node_temp_ai["Temporary AI<br/>[temp_ai.py]"]
end

subgraph group_domain["Game domain"]
  node_pou["Pou combatant<br/>[pou.py]"]
  node_skills["Skill behavior<br/>[skills.py]"]
  node_passive["Passive behavior<br/>[passive.py]"]
  node_passive_effects["Passive effects<br/>[passive_effects.py]"]
end

subgraph group_content["Game content"]
  node_skill_catalog["Skill catalog<br/>[skills_list.py]"]
  node_pou_catalog["Pou models<br/>[pou_list.py]"]
  node_passive_catalog["Passive catalog<br/>[passive_list.py]"]
  node_status_catalog["Status catalog<br/>[status_list.py]"]
  node_element_catalog["Element chart<br/>[elem_list.py]"]
end

subgraph group_presentation["Terminal interface"]
  node_display["Battle display<br/>[display.py]"]
  node_colors["Terminal colors<br/>[colors.py]"]
end

node_player(("Player"))

node_player -->|"starts game"| node_entry_screen
node_entry_screen -->|"starts"| node_game_main
node_game_main -->|"creates teams"| node_team_creation
node_game_main -->|"runs turns"| node_battle_engine
node_game_main -->|"checks team state"| node_team
node_game_main -->|"requests displays"| node_display
node_game_main -->|"creates controller"| node_computer_ai
node_team_creation -->|"builds combatants"| node_pou
node_team_creation -->|"loads models"| node_pou_catalog
node_team_creation -->|"assembles team"| node_team
node_team_creation -->|"requests prompts"| node_display
node_battle_engine -->|"renders actions"| node_display
node_battle_engine -->|"requests action"| node_computer_ai
node_battle_engine -->|"switches combatants"| node_team
node_battle_engine -->|"checks passives"| node_pou
node_battle_engine -->|"applies selected skill"| node_skills
node_skill_catalog -->|"instantiates skills"| node_skills
node_pou_catalog -->|"selects skills"| node_skill_catalog
node_pou_catalog -->|"selects passives"| node_passive_catalog
node_passive_catalog -->|"instantiates passives"| node_passive
node_skills -->|"loads status data"| node_status_catalog
node_skills -->|"applies effects"| node_pou
node_pou -->|"checks effectiveness"| node_element_catalog
node_display -->|"formats output"| node_colors
node_player -->|"chooses team"| node_team_creation

click node_entry_screen "https://github.com/gotenten/project_p/blob/main/ui/start_screen.py"
click node_game_main "https://github.com/gotenten/project_p/blob/main/core/main.py"
click node_team_creation "https://github.com/gotenten/project_p/blob/main/systems/team_creation.py"
click node_battle_engine "https://github.com/gotenten/project_p/blob/main/core/battle.py"
click node_team "https://github.com/gotenten/project_p/blob/main/core/team.py"
click node_computer_ai "https://github.com/gotenten/project_p/blob/main/core/ai_function_maitre_yoda.py"
click node_ai_functions "https://github.com/gotenten/project_p/blob/main/core/ai_function.py"
click node_temp_ai "https://github.com/gotenten/project_p/blob/main/core/temp_ai.py"
click node_pou "https://github.com/gotenten/project_p/blob/main/core/pou.py"
click node_skills "https://github.com/gotenten/project_p/blob/main/core/skills.py"
click node_passive "https://github.com/gotenten/project_p/blob/main/core/passive.py"
click node_passive_effects "https://github.com/gotenten/project_p/blob/main/core/passive_effects.py"
click node_skill_catalog "https://github.com/gotenten/project_p/blob/main/data/skills_list.py"
click node_pou_catalog "https://github.com/gotenten/project_p/blob/main/data/pou_list.py"
click node_passive_catalog "https://github.com/gotenten/project_p/blob/main/data/passive_list.py"
click node_status_catalog "https://github.com/gotenten/project_p/blob/main/data/status_list.py"
click node_element_catalog "https://github.com/gotenten/project_p/blob/main/data/elem_list.py"
click node_display "https://github.com/gotenten/project_p/blob/main/ui/display.py"
click node_colors "https://github.com/gotenten/project_p/blob/main/ui/colors.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_entry_screen,node_game_main,node_team_creation toneBlue
class node_battle_engine,node_team,node_computer_ai,node_ai_functions,node_temp_ai toneAmber
class node_pou,node_skills,node_passive,node_passive_effects toneMint
class node_skill_catalog,node_pou_catalog,node_passive_catalog,node_status_catalog,node_element_catalog toneRose
class node_display,node_colors,node_player toneIndigo
```

## Components

### Game entry

- [Start screen](https://github.com/gotenten/project_p/blob/main/ui/start_screen.py): `ui/start_screen.py`
- [Game coordinator](https://github.com/gotenten/project_p/blob/main/core/main.py): `core/main.py`
- [Team creation](https://github.com/gotenten/project_p/blob/main/systems/team_creation.py): `systems/team_creation.py`

### Battle runtime

- [Battle turns](https://github.com/gotenten/project_p/blob/main/core/battle.py): `core/battle.py`
- [Team state](https://github.com/gotenten/project_p/blob/main/core/team.py): `core/team.py`
- [Yoda AI](https://github.com/gotenten/project_p/blob/main/core/ai_function_maitre_yoda.py): `core/ai_function_maitre_yoda.py`
- [AI functions](https://github.com/gotenten/project_p/blob/main/core/ai_function.py): `core/ai_function.py`
- [Temporary AI](https://github.com/gotenten/project_p/blob/main/core/temp_ai.py): `core/temp_ai.py`

### Game domain

- [Pou combatant](https://github.com/gotenten/project_p/blob/main/core/pou.py): `core/pou.py`
- [Skill behavior](https://github.com/gotenten/project_p/blob/main/core/skills.py): `core/skills.py`
- [Passive behavior](https://github.com/gotenten/project_p/blob/main/core/passive.py): `core/passive.py`
- [Passive effects](https://github.com/gotenten/project_p/blob/main/core/passive_effects.py): `core/passive_effects.py`

### Game content

- [Skill catalog](https://github.com/gotenten/project_p/blob/main/data/skills_list.py): `data/skills_list.py`
- [Pou models](https://github.com/gotenten/project_p/blob/main/data/pou_list.py): `data/pou_list.py`
- [Passive catalog](https://github.com/gotenten/project_p/blob/main/data/passive_list.py): `data/passive_list.py`
- [Status catalog](https://github.com/gotenten/project_p/blob/main/data/status_list.py): `data/status_list.py`
- [Element chart](https://github.com/gotenten/project_p/blob/main/data/elem_list.py): `data/elem_list.py`

### Terminal interface

- [Battle display](https://github.com/gotenten/project_p/blob/main/ui/display.py): `ui/display.py`
- [Terminal colors](https://github.com/gotenten/project_p/blob/main/ui/colors.py): `ui/colors.py`

### Other components

- **Player**

## Connections

- Player → Start screen: starts game (evidence: `README.md`)
- Start screen → Game coordinator: starts (evidence: `ui/start_screen.py`)
- Game coordinator → Team creation: creates teams (evidence: `core/main.py`)
- Game coordinator → Battle turns: runs turns (evidence: `core/main.py`)
- Game coordinator → Team state: checks team state (evidence: `core/main.py`)
- Game coordinator → Battle display: requests displays (evidence: `core/main.py`)
- Game coordinator → Yoda AI: creates controller (evidence: `core/main.py`)
- Team creation → Pou combatant: builds combatants (evidence: `systems/team_creation.py`)
- Team creation → Pou models: loads models (evidence: `systems/team_creation.py`)
- Team creation → Team state: assembles team (evidence: `systems/team_creation.py`)
- Team creation → Battle display: requests prompts (evidence: `systems/team_creation.py`)
- Battle turns → Battle display: renders actions (evidence: `core/battle.py`)
- Battle turns → Yoda AI: requests action (evidence: `core/battle.py`)
- Battle turns → Team state: switches combatants (evidence: `core/battle.py`)
- Battle turns → Pou combatant: checks passives (evidence: `core/battle.py`)
- Battle turns → Skill behavior: applies selected skill (evidence: `core/battle.py`)
- Skill catalog → Skill behavior: instantiates skills (evidence: `data/skills_list.py`)
- Pou models → Skill catalog: selects skills (evidence: `data/pou_list.py`)
- Pou models → Passive catalog: selects passives (evidence: `data/pou_list.py`)
- Passive catalog → Passive behavior: instantiates passives (evidence: `data/passive_list.py`)
- Skill behavior → Status catalog: loads status data (evidence: `core/skills.py`)
- Skill behavior → Pou combatant: applies effects (evidence: `core/skills.py`)
- Pou combatant → Element chart: checks effectiveness (evidence: `core/pou.py`)
- Battle display → Terminal colors: formats output (evidence: `ui/display.py`)
- Player → Team creation: chooses team (evidence: `README.md`)
