# teamodd/salem architecture

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

- Interactive diagram: https://gitdiagram.com/teamodd/salem
- Repository: https://github.com/teamodd/salem

## Overview

Salem is a Unity game project. The tree suggests a player-facing flow through title and tutorial content into role-based rounds, character behavior, night resolution, and score presentation. Those are inferred from filenames and assets, not verified calls: the README gives only the project name, and no source excerpts were supplied, so the graph avoids asserting runtime connections.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_flow["Round Flow"]
  node_gameflow["Game Flow<br/>[GameManager.cs]"]
  node_flowstates["Flow States"]
  node_level["Level Data<br/>[LevelData.cs]"]
  node_roles["Role Assignment<br/>[RoleAssigner.cs]"]
  node_night["Night Resolution"]
  node_execution["Execution"]
  node_score["Score Tracking<br/>[ScoreManager.cs]"]
end

subgraph group_actors["Characters and AI"]
  node_characters["Character Model<br/>[Character.cs]"]
  node_characterdata["Character Data<br/>[CharacterData.cs]"]
  node_interaction["Character Interaction"]
  node_ai["Character AI<br/>[CharacterAI.cs]"]
  node_roleai["Role AI"]
end

subgraph group_tutorial["Tutorial and Dialogue"]
  node_tutorialmanager["Tutorial Manager<br/>[TutorialManager.cs]"]
  node_tutorialscenario["Tutorial Scenarios"]
  node_yarn["Dialogue Content"]
end

subgraph group_presentation["UI and Results"]
  node_title["Title Screen"]
  node_roleguess["Role Guess UI"]
  node_roleinfo["Role Information"]
  node_summary["Score Summary<br/>[ScoreSummaryUI.cs]"]
  node_settings["Settings and Audio<br/>[SettingsManager.cs]"]
end

node_player(("Player"))

click node_title "https://github.com/teamodd/salem/blob/main/Assets/Scripts/UI/TitleSceneController.cs"
click node_gameflow "https://github.com/teamodd/salem/blob/main/Assets/Scripts/System/GameManager.cs"
click node_flowstates "https://github.com/teamodd/salem/tree/main/Assets/Scripts/System/GameFlow"
click node_level "https://github.com/teamodd/salem/blob/main/Assets/Scripts/Gameplay/LevelData.cs"
click node_roles "https://github.com/teamodd/salem/blob/main/Assets/Scripts/System/RoleAssigner.cs"
click node_night "https://github.com/teamodd/salem/blob/main/Assets/Scripts/System/GameFlow/NightResolutionState.cs"
click node_execution "https://github.com/teamodd/salem/blob/main/Assets/Scripts/System/ExecutionManager.cs"
click node_score "https://github.com/teamodd/salem/blob/main/Assets/Scripts/System/ScoreManager.cs"
click node_characters "https://github.com/teamodd/salem/blob/main/Assets/Scripts/Gameplay/Character.cs"
click node_characterdata "https://github.com/teamodd/salem/blob/main/Assets/Scripts/Characters/CharacterData.cs"
click node_interaction "https://github.com/teamodd/salem/blob/main/Assets/Scripts/Characters/CharacterInteraction.cs"
click node_ai "https://github.com/teamodd/salem/blob/main/Assets/Scripts/AI/CharacterAI.cs"
click node_roleai "https://github.com/teamodd/salem/tree/main/Assets/Scripts/AI"
click node_tutorialmanager "https://github.com/teamodd/salem/blob/main/Assets/Scripts/Tutorial/TutorialManager.cs"
click node_tutorialscenario "https://github.com/teamodd/salem/blob/main/Assets/Scripts/Tutorial/TutorialScenarioData.cs"
click node_yarn "https://github.com/teamodd/salem/tree/main/Assets/Dialogue"
click node_roleguess "https://github.com/teamodd/salem/blob/main/Assets/Scripts/UI/RoleGuessManager.cs"
click node_roleinfo "https://github.com/teamodd/salem/blob/main/Assets/Scripts/UI/RoleInfoPanelController.cs"
click node_summary "https://github.com/teamodd/salem/blob/main/Assets/Scripts/UI/ScoreSummaryUI.cs"
click node_settings "https://github.com/teamodd/salem/blob/main/Assets/Scripts/UI/SettingsManager.cs"

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_gameflow,node_flowstates,node_level,node_roles,node_night,node_execution,node_score toneBlue
class node_characters,node_characterdata,node_interaction,node_ai,node_roleai toneAmber
class node_tutorialmanager,node_tutorialscenario,node_yarn toneMint
class node_title,node_roleguess,node_roleinfo,node_summary,node_settings toneRose
class node_player toneIndigo
```

## Components

### Round Flow

- [Game Flow](https://github.com/teamodd/salem/blob/main/Assets/Scripts/System/GameManager.cs): `Assets/Scripts/System/GameManager.cs`
- [Flow States](https://github.com/teamodd/salem/tree/main/Assets/Scripts/System/GameFlow): `Assets/Scripts/System/GameFlow`
- [Level Data](https://github.com/teamodd/salem/blob/main/Assets/Scripts/Gameplay/LevelData.cs): `Assets/Scripts/Gameplay/LevelData.cs`
- [Role Assignment](https://github.com/teamodd/salem/blob/main/Assets/Scripts/System/RoleAssigner.cs): `Assets/Scripts/System/RoleAssigner.cs`
- [Night Resolution](https://github.com/teamodd/salem/blob/main/Assets/Scripts/System/GameFlow/NightResolutionState.cs): `Assets/Scripts/System/GameFlow/NightResolutionState.cs`
- [Execution](https://github.com/teamodd/salem/blob/main/Assets/Scripts/System/ExecutionManager.cs): `Assets/Scripts/System/ExecutionManager.cs`
- [Score Tracking](https://github.com/teamodd/salem/blob/main/Assets/Scripts/System/ScoreManager.cs): `Assets/Scripts/System/ScoreManager.cs`

### Characters and AI

- [Character Model](https://github.com/teamodd/salem/blob/main/Assets/Scripts/Gameplay/Character.cs): `Assets/Scripts/Gameplay/Character.cs`
- [Character Data](https://github.com/teamodd/salem/blob/main/Assets/Scripts/Characters/CharacterData.cs): `Assets/Scripts/Characters/CharacterData.cs`
- [Character Interaction](https://github.com/teamodd/salem/blob/main/Assets/Scripts/Characters/CharacterInteraction.cs): `Assets/Scripts/Characters/CharacterInteraction.cs`
- [Character AI](https://github.com/teamodd/salem/blob/main/Assets/Scripts/AI/CharacterAI.cs): `Assets/Scripts/AI/CharacterAI.cs`
- [Role AI](https://github.com/teamodd/salem/tree/main/Assets/Scripts/AI): `Assets/Scripts/AI`

### Tutorial and Dialogue

- [Tutorial Manager](https://github.com/teamodd/salem/blob/main/Assets/Scripts/Tutorial/TutorialManager.cs): `Assets/Scripts/Tutorial/TutorialManager.cs`
- [Tutorial Scenarios](https://github.com/teamodd/salem/blob/main/Assets/Scripts/Tutorial/TutorialScenarioData.cs): `Assets/Scripts/Tutorial/TutorialScenarioData.cs`
- [Dialogue Content](https://github.com/teamodd/salem/tree/main/Assets/Dialogue): `Assets/Dialogue`

### UI and Results

- [Title Screen](https://github.com/teamodd/salem/blob/main/Assets/Scripts/UI/TitleSceneController.cs): `Assets/Scripts/UI/TitleSceneController.cs`
- [Role Guess UI](https://github.com/teamodd/salem/blob/main/Assets/Scripts/UI/RoleGuessManager.cs): `Assets/Scripts/UI/RoleGuessManager.cs`
- [Role Information](https://github.com/teamodd/salem/blob/main/Assets/Scripts/UI/RoleInfoPanelController.cs): `Assets/Scripts/UI/RoleInfoPanelController.cs`
- [Score Summary](https://github.com/teamodd/salem/blob/main/Assets/Scripts/UI/ScoreSummaryUI.cs): `Assets/Scripts/UI/ScoreSummaryUI.cs`
- [Settings and Audio](https://github.com/teamodd/salem/blob/main/Assets/Scripts/UI/SettingsManager.cs): `Assets/Scripts/UI/SettingsManager.cs`

### Other components

- **Player**
