# laststudio/dolove architecture

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

- Interactive diagram: https://gitdiagram.com/laststudio/dolove
- Repository: https://github.com/laststudio/dolove

## Overview

This repository is a collection of three small, independent console programs rather than one integrated application: a text-animation demo, a parody relationship simulation in three languages, and a Chinese branching-story game. The game loads plot data, accepts choices, updates character stats and flags, checks endings, and saves progress. The README does not document these capabilities; the map is based on the supplied source excerpts and tree. The save-file path is referenced in code but no save file is present in the tree.

Main entry points: [`galagame/main.py`](https://github.com/laststudio/dolove/blob/main/galagame/main.py) (Scene player), [`dolove/c++/main.cpp`](https://github.com/laststudio/dolove/blob/main/dolove/c%2B%2B/main.cpp) (C++ scenarios), [`dolove/kotlin/class/src/Main.kt`](https://github.com/laststudio/dolove/blob/main/dolove/kotlin/class/src/Main.kt) (Kotlin scenarios), [`dolove/python/class.py`](https://github.com/laststudio/dolove/blob/main/dolove/python/class.py) (Python scenarios)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_animation["Text animation"]
  node_animation_cpp["C++ animation<br/>[main.cpp]"]
  node_animation_python["Python animation<br/>[main.py]"]
  node_animation_kotlin["Kotlin animation<br/>[Main.kt]"]
end

subgraph group_simulation["Parody simulation"]
  node_simulation_cpp["C++ scenarios<br/>[main.cpp]"]
  node_simulation_cpp_rules["C++ character rules<br/>[main.cpp]"]
  node_simulation_kotlin["Kotlin scenarios<br/>[Main.kt]"]
  node_simulation_kotlin_rules["Kotlin character rules<br/>[Main.kt]"]
  node_simulation_python["Python scenarios<br/>[class.py]"]
  node_simulation_python_rules["Python character rules<br/>[class.py]"]
end

subgraph group_game["Branching story"]
  node_game_entry["Game entry<br/>[main.py]"]
  node_story_storage["Plot and saves<br/>[main.py]"]
  node_plot_data["Plot data<br/>[剧情.json]"]
  node_player["Scene player<br/>[main.py]"]
  node_protagonist["Character state<br/>[main.py]"]
end

node_terminal(("Console user"))

node_terminal -->|"runs demo"| node_animation_cpp
node_animation_cpp -->|"prints animation"| node_terminal
node_terminal -->|"runs demo"| node_animation_python
node_animation_python -->|"prints animation"| node_terminal
node_terminal -->|"runs demo"| node_animation_kotlin
node_animation_kotlin -->|"prints animation"| node_terminal
node_terminal -->|"runs scenarios"| node_simulation_cpp
node_simulation_cpp -->|"calls rules"| node_simulation_cpp_rules
node_simulation_cpp -->|"prints outcomes"| node_terminal
node_terminal -->|"runs scenarios"| node_simulation_kotlin
node_simulation_kotlin -->|"calls rules"| node_simulation_kotlin_rules
node_simulation_kotlin -->|"prints outcomes"| node_terminal
node_terminal -->|"runs scenarios"| node_simulation_python
node_simulation_python -->|"calls rules"| node_simulation_python_rules
node_simulation_python -->|"prints outcomes"| node_terminal
node_terminal -->|"starts game"| node_game_entry
node_game_entry -->|"loads plot and save"| node_story_storage
node_story_storage -->|"reads plot"| node_plot_data
node_game_entry -->|"creates character"| node_protagonist
node_game_entry -->|"starts play"| node_player
node_player -->|"prompts and narrates"| node_terminal
node_player -->|"updates stats"| node_protagonist
node_player -->|"commits progress"| node_story_storage
node_player -->|"reads scenes"| node_plot_data
node_story_storage -->|"prompts new save"| node_terminal

click node_animation_cpp "https://github.com/laststudio/dolove/blob/main/IamGAY/c%2B%2B/main.cpp"
click node_animation_python "https://github.com/laststudio/dolove/blob/main/IamGAY/python/main.py"
click node_animation_kotlin "https://github.com/laststudio/dolove/blob/main/IamGAY/kotlin/src/Main.kt"
click node_simulation_cpp "https://github.com/laststudio/dolove/blob/main/dolove/c%2B%2B/main.cpp"
click node_simulation_cpp_rules "https://github.com/laststudio/dolove/blob/main/dolove/c%2B%2B/main.cpp"
click node_simulation_kotlin "https://github.com/laststudio/dolove/blob/main/dolove/kotlin/class/src/Main.kt"
click node_simulation_kotlin_rules "https://github.com/laststudio/dolove/blob/main/dolove/kotlin/class/src/Main.kt"
click node_simulation_python "https://github.com/laststudio/dolove/blob/main/dolove/python/class.py"
click node_simulation_python_rules "https://github.com/laststudio/dolove/blob/main/dolove/python/class.py"
click node_game_entry "https://github.com/laststudio/dolove/blob/main/galagame/main.py"
click node_story_storage "https://github.com/laststudio/dolove/blob/main/galagame/main.py"
click node_plot_data "https://github.com/laststudio/dolove/blob/main/galagame/%E5%89%A7%E6%83%85.json"
click node_player "https://github.com/laststudio/dolove/blob/main/galagame/main.py"
click node_protagonist "https://github.com/laststudio/dolove/blob/main/galagame/main.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_animation_cpp,node_animation_python,node_animation_kotlin,node_terminal toneBlue
class node_simulation_cpp,node_simulation_cpp_rules,node_simulation_kotlin,node_simulation_kotlin_rules,node_simulation_python,node_simulation_python_rules toneAmber
class node_game_entry,node_story_storage,node_plot_data,node_player,node_protagonist toneMint
```

## Components

### Text animation

- [C++ animation](https://github.com/laststudio/dolove/blob/main/IamGAY/c%2B%2B/main.cpp): `IamGAY/c++/main.cpp`
- [Python animation](https://github.com/laststudio/dolove/blob/main/IamGAY/python/main.py): `IamGAY/python/main.py`
- [Kotlin animation](https://github.com/laststudio/dolove/blob/main/IamGAY/kotlin/src/Main.kt): `IamGAY/kotlin/src/Main.kt`

### Parody simulation

- [C++ scenarios](https://github.com/laststudio/dolove/blob/main/dolove/c%2B%2B/main.cpp): `dolove/c++/main.cpp`
- [C++ character rules](https://github.com/laststudio/dolove/blob/main/dolove/c%2B%2B/main.cpp): `dolove/c++/main.cpp`
- [Kotlin scenarios](https://github.com/laststudio/dolove/blob/main/dolove/kotlin/class/src/Main.kt): `dolove/kotlin/class/src/Main.kt`
- [Kotlin character rules](https://github.com/laststudio/dolove/blob/main/dolove/kotlin/class/src/Main.kt): `dolove/kotlin/class/src/Main.kt`
- [Python scenarios](https://github.com/laststudio/dolove/blob/main/dolove/python/class.py): `dolove/python/class.py`
- [Python character rules](https://github.com/laststudio/dolove/blob/main/dolove/python/class.py): `dolove/python/class.py`

### Branching story

- [Game entry](https://github.com/laststudio/dolove/blob/main/galagame/main.py): `galagame/main.py`
- [Plot and saves](https://github.com/laststudio/dolove/blob/main/galagame/main.py): `galagame/main.py`
- [Plot data](https://github.com/laststudio/dolove/blob/main/galagame/%E5%89%A7%E6%83%85.json): `galagame/剧情.json`
- [Scene player](https://github.com/laststudio/dolove/blob/main/galagame/main.py): `galagame/main.py`
- [Character state](https://github.com/laststudio/dolove/blob/main/galagame/main.py): `galagame/main.py`

### Other components

- **Console user**

## Connections

- Console user → C++ animation: runs demo (evidence: `IamGAY/c++/main.cpp`)
- C++ animation → Console user: prints animation (evidence: `IamGAY/c++/main.cpp`)
- Console user → Python animation: runs demo (evidence: `IamGAY/python/main.py`)
- Python animation → Console user: prints animation (evidence: `IamGAY/python/main.py`)
- Console user → Kotlin animation: runs demo (evidence: `IamGAY/kotlin/src/Main.kt`)
- Kotlin animation → Console user: prints animation (evidence: `IamGAY/kotlin/src/Main.kt`)
- Console user → C++ scenarios: runs scenarios (evidence: `dolove/c++/main.cpp`)
- C++ scenarios → C++ character rules: calls rules (evidence: `dolove/c++/main.cpp`)
- C++ scenarios → Console user: prints outcomes (evidence: `dolove/c++/main.cpp`)
- Console user → Kotlin scenarios: runs scenarios (evidence: `dolove/kotlin/class/src/Main.kt`)
- Kotlin scenarios → Kotlin character rules: calls rules (evidence: `dolove/kotlin/class/src/Main.kt`)
- Kotlin scenarios → Console user: prints outcomes (evidence: `dolove/kotlin/class/src/Main.kt`)
- Console user → Python scenarios: runs scenarios (evidence: `dolove/python/class.py`)
- Python scenarios → Python character rules: calls rules (evidence: `dolove/python/class.py`)
- Python scenarios → Console user: prints outcomes (evidence: `dolove/python/class.py`)
- Console user → Game entry: starts game (evidence: `galagame/main.py`)
- Game entry → Plot and saves: loads plot and save (evidence: `galagame/main.py`)
- Plot and saves → Plot data: reads plot (evidence: `galagame/main.py`)
- Game entry → Character state: creates character (evidence: `galagame/main.py`)
- Game entry → Scene player: starts play (evidence: `galagame/main.py`)
- Scene player → Console user: prompts and narrates (evidence: `galagame/main.py`)
- Scene player → Character state: updates stats (evidence: `galagame/main.py`)
- Scene player → Plot and saves: commits progress (evidence: `galagame/main.py`)
- Scene player → Plot data: reads scenes (evidence: `galagame/main.py`)
- Plot and saves → Console user: prompts new save (evidence: `galagame/main.py`)
