# shifter130/protivtecheniya architecture

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

- Interactive diagram: https://gitdiagram.com/shifter130/protivtecheniya
- Repository: https://github.com/shifter130/protivtecheniya

## Overview

Против Течения is a console-game adaptation of a TV quiz, with a companion Windows Forms editor for creating question files. The main workflow loads questions and settings, presents a timed question chain, and records winnings; the menu also exposes settings and prior records. The README documents season-one rules and question authoring, while alternate rulesets are described as unavailable. The editor and game are separate applications. Edges reflect shown calls and file operations; the rules stage is documented, but its runtime handling is not established by the excerpts.

Main entry points: [`ProtivTecheniya/Program.cs`](https://github.com/shifter130/protivtecheniya/blob/main/ProtivTecheniya/Program.cs) (Game entry), [`ProtivTecheniya/GameManager.cs`](https://github.com/shifter130/protivtecheniya/blob/main/ProtivTecheniya/GameManager.cs) (Question chain), [`ProtivTecheniya/Questionator/Loader.cs`](https://github.com/shifter130/protivtecheniya/blob/main/ProtivTecheniya/Questionator/Loader.cs) (Question loader), [`ProtivTecheniya/Configurator.cs`](https://github.com/shifter130/protivtecheniya/blob/main/ProtivTecheniya/Configurator.cs) (Configuration access)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_game["Quiz game"]
  node_game_entry["Game entry<br/>[Program.cs]"]
  node_game_menu["Menu and records<br/>[Program.cs]"]
  node_gameplay["Question chain<br/>[GameManager.cs]"]
  node_timer["Timer and bank<br/>[GameManager.cs]"]
end

subgraph group_content["Question content"]
  node_question_loader["Question loader<br/>[Loader.cs]"]
  node_question_model["Question model<br/>[StructModel.cs]"]
  node_question_file["Questions file"]
  node_rules["Season-one rules<br/>[Rules.txt]"]
end

subgraph group_settings["Settings and records"]
  node_configurator["Configuration access<br/>[Configurator.cs]"]
  node_config_file["Config file<br/>[Config.txt]"]
  node_records_file["Records file"]
end

subgraph group_authoring["Question authoring"]
  node_studio_entry["Studio entry<br/>[Program.cs]"]
  node_studio_form["Question editor<br/>[Form1.cs]"]
end

node_player(("Player"))
node_editor_user(("Question author"))

node_player -->|"starts"| node_game_entry
node_game_entry -->|"loads questions"| node_question_loader
node_game_entry -->|"reads setting"| node_configurator
node_game_entry -->|"shows menu"| node_game_menu
node_game_menu -->|"starts game"| node_gameplay
node_game_menu -->|"changes setting"| node_configurator
node_game_menu -->|"reads records"| node_records_file
node_question_loader -->|"reads questions"| node_question_file
node_question_loader -->|"creates questions"| node_question_model
node_gameplay -->|"starts timer"| node_timer
node_gameplay -->|"writes winnings"| node_records_file
node_gameplay -->|"refers player"| node_rules
node_configurator -->|"reads and writes"| node_config_file
node_editor_user -->|"opens editor"| node_studio_entry
node_studio_entry -->|"runs form"| node_studio_form
node_studio_form -->|"appends questions"| node_question_file

click node_game_entry "https://github.com/shifter130/protivtecheniya/blob/main/ProtivTecheniya/Program.cs"
click node_game_menu "https://github.com/shifter130/protivtecheniya/blob/main/ProtivTecheniya/Program.cs"
click node_gameplay "https://github.com/shifter130/protivtecheniya/blob/main/ProtivTecheniya/GameManager.cs"
click node_timer "https://github.com/shifter130/protivtecheniya/blob/main/ProtivTecheniya/GameManager.cs"
click node_question_loader "https://github.com/shifter130/protivtecheniya/blob/main/ProtivTecheniya/Questionator/Loader.cs"
click node_question_model "https://github.com/shifter130/protivtecheniya/blob/main/ProtivTecheniya/Questionator/StructModel.cs"
click node_rules "https://github.com/shifter130/protivtecheniya/blob/main/ProtivTecheniya/Rules.txt"
click node_configurator "https://github.com/shifter130/protivtecheniya/blob/main/ProtivTecheniya/Configurator.cs"
click node_config_file "https://github.com/shifter130/protivtecheniya/blob/main/ProtivTecheniya/Config.txt"
click node_studio_entry "https://github.com/shifter130/protivtecheniya/blob/main/ProtivTecheniya.Studio/Program.cs"
click node_studio_form "https://github.com/shifter130/protivtecheniya/blob/main/ProtivTecheniya.Studio/Form1.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_game_entry,node_game_menu,node_gameplay,node_timer toneBlue
class node_question_loader,node_question_model,node_question_file,node_rules toneAmber
class node_configurator,node_config_file,node_records_file toneMint
class node_studio_entry,node_studio_form toneRose
class node_player,node_editor_user toneIndigo
```

## Components

### Quiz game

- [Game entry](https://github.com/shifter130/protivtecheniya/blob/main/ProtivTecheniya/Program.cs): `ProtivTecheniya/Program.cs`
- [Menu and records](https://github.com/shifter130/protivtecheniya/blob/main/ProtivTecheniya/Program.cs): `ProtivTecheniya/Program.cs`
- [Question chain](https://github.com/shifter130/protivtecheniya/blob/main/ProtivTecheniya/GameManager.cs): `ProtivTecheniya/GameManager.cs`
- [Timer and bank](https://github.com/shifter130/protivtecheniya/blob/main/ProtivTecheniya/GameManager.cs): `ProtivTecheniya/GameManager.cs`

### Question content

- [Question loader](https://github.com/shifter130/protivtecheniya/blob/main/ProtivTecheniya/Questionator/Loader.cs): `ProtivTecheniya/Questionator/Loader.cs`
- [Question model](https://github.com/shifter130/protivtecheniya/blob/main/ProtivTecheniya/Questionator/StructModel.cs): `ProtivTecheniya/Questionator/StructModel.cs`
- **Questions file**
- [Season-one rules](https://github.com/shifter130/protivtecheniya/blob/main/ProtivTecheniya/Rules.txt): `ProtivTecheniya/Rules.txt`

### Settings and records

- [Configuration access](https://github.com/shifter130/protivtecheniya/blob/main/ProtivTecheniya/Configurator.cs): `ProtivTecheniya/Configurator.cs`
- [Config file](https://github.com/shifter130/protivtecheniya/blob/main/ProtivTecheniya/Config.txt): `ProtivTecheniya/Config.txt`
- **Records file**

### Question authoring

- [Studio entry](https://github.com/shifter130/protivtecheniya/blob/main/ProtivTecheniya.Studio/Program.cs): `ProtivTecheniya.Studio/Program.cs`
- [Question editor](https://github.com/shifter130/protivtecheniya/blob/main/ProtivTecheniya.Studio/Form1.cs): `ProtivTecheniya.Studio/Form1.cs`

### Other components

- **Player**
- **Question author**

## Connections

- Player → Game entry: starts (evidence: `ProtivTecheniya/Program.cs`)
- Game entry → Question loader: loads questions (evidence: `ProtivTecheniya/Program.cs`)
- Game entry → Configuration access: reads setting (evidence: `ProtivTecheniya/Program.cs`)
- Game entry → Menu and records: shows menu (evidence: `ProtivTecheniya/Program.cs`)
- Menu and records → Question chain: starts game (evidence: `ProtivTecheniya/Program.cs`)
- Menu and records → Configuration access: changes setting (evidence: `ProtivTecheniya/Program.cs`)
- Menu and records → Records file: reads records (evidence: `ProtivTecheniya/Program.cs`)
- Question loader → Questions file: reads questions (evidence: `ProtivTecheniya/Questionator/Loader.cs`)
- Question loader → Question model: creates questions (evidence: `ProtivTecheniya/Questionator/Loader.cs`)
- Question chain → Timer and bank: starts timer (evidence: `ProtivTecheniya/GameManager.cs`)
- Question chain → Records file: writes winnings (evidence: `ProtivTecheniya/GameManager.cs`)
- Question chain → Season-one rules: refers player (evidence: `ProtivTecheniya/GameManager.cs`)
- Configuration access → Config file: reads and writes (evidence: `ProtivTecheniya/Configurator.cs`)
- Question author → Studio entry: opens editor (evidence: `README.md`)
- Studio entry → Question editor: runs form (evidence: `ProtivTecheniya.Studio/Program.cs`)
- Question editor → Questions file: appends questions (evidence: `ProtivTecheniya.Studio/Form1.cs`)
