# jacob-horndahl-dev/diamond_fighters-quiz_battle architecture

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

- Interactive diagram: https://gitdiagram.com/jacob-horndahl-dev/diamond_fighters-quiz_battle
- Repository: https://github.com/jacob-horndahl-dev/diamond_fighters-quiz_battle

## Overview

Diamond Fighters is a console-based, multiplayer quiz game. Players choose a game from the menu, enter names and round count, answer category-based questions, and see ranked results; scores are also saved to and displayed from a high-score list. The game delegates question selection to a manager, which loads and shuffles questions through a JSON repository. Question types define answer presentation and checking. The README gives no further capability details; some links below rely on the SOURCE INDEX because only selected source excerpts were provided.

Main entry points: [`Diamond_Fighters-Quiz_Battle/Game.cs`](https://github.com/jacob-horndahl-dev/diamond_fighters-quiz_battle/blob/main/Diamond_Fighters-Quiz_Battle/Game.cs) (Game rounds), [`Diamond_Fighters-Quiz_Battle/JsonQuestionRepository.cs`](https://github.com/jacob-horndahl-dev/diamond_fighters-quiz_battle/blob/main/Diamond_Fighters-Quiz_Battle/JsonQuestionRepository.cs) (JSON question loader), [`Diamond_Fighters-Quiz_Battle/Menu.cs`](https://github.com/jacob-horndahl-dev/diamond_fighters-quiz_battle/blob/main/Diamond_Fighters-Quiz_Battle/Menu.cs) (Main menu), [`Diamond_Fighters-Quiz_Battle/HighScoreManager.cs`](https://github.com/jacob-horndahl-dev/diamond_fighters-quiz_battle/blob/main/Diamond_Fighters-Quiz_Battle/HighScoreManager.cs) (High-score manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Console entry"]
  node_program["Application startup<br/>[Program.cs]"]
  node_menu["Main menu<br/>[Menu.cs]"]
end

subgraph group_play["Quiz gameplay"]
  node_game["Game rounds<br/>[Game.cs]"]
  node_player["Player state<br/>[Player.cs]"]
  node_score["Score rules<br/>[ScoreManager.cs]"]
  node_question_mgr["Question selection<br/>[QuestionManager.cs]"]
end

subgraph group_data["Questions and records"]
  node_question["Question model<br/>[Question.cs]"]
  node_multiple["Multiple choice"]
  node_truefalse["True/false"]
  node_repository["Question repository"]
  node_json_repo["JSON question loader"]
  node_question_file["Question data<br/>[questions.json]"]
  node_highscore["High-score manager"]
  node_entry_model["High-score entry<br/>[HighScoreEntry.cs]"]
  node_score_file[("Score file storage")]
end

node_player_actor(("Players"))

node_player_actor -->|"chooses options"| node_menu
node_program -->|"starts menu"| node_menu
node_program -->|"creates manager"| node_highscore
node_menu -->|"starts game"| node_game
node_menu -->|"shows scores"| node_highscore
node_menu -->|"creates manager"| node_question_mgr
node_game -->|"requests questions"| node_question_mgr
node_game -->|"updates players"| node_player
node_game -->|"calculates scoring"| node_score
node_game -->|"saves results"| node_highscore
node_game -->|"checks questions"| node_question
node_game -->|"handles answers"| node_multiple
node_game -->|"handles answers"| node_truefalse
node_question_mgr -->|"loads through"| node_repository
node_question_mgr -->|"selects implementation"| node_json_repo
node_json_repo -->|"reads JSON"| node_question_file
node_json_repo -->|"creates questions"| node_question
node_json_repo -->|"creates type"| node_multiple
node_json_repo -->|"creates type"| node_truefalse
node_multiple -->|"inherits model"| node_question
node_truefalse -->|"inherits model"| node_question
node_score -->|"ranks players"| node_player
node_highscore -->|"loads entries"| node_entry_model
node_highscore -->|"reads and writes"| node_score_file

click node_program "https://github.com/jacob-horndahl-dev/diamond_fighters-quiz_battle/blob/main/Diamond_Fighters-Quiz_Battle/Program.cs"
click node_menu "https://github.com/jacob-horndahl-dev/diamond_fighters-quiz_battle/blob/main/Diamond_Fighters-Quiz_Battle/Menu.cs"
click node_game "https://github.com/jacob-horndahl-dev/diamond_fighters-quiz_battle/blob/main/Diamond_Fighters-Quiz_Battle/Game.cs"
click node_player "https://github.com/jacob-horndahl-dev/diamond_fighters-quiz_battle/blob/main/Diamond_Fighters-Quiz_Battle/Player.cs"
click node_score "https://github.com/jacob-horndahl-dev/diamond_fighters-quiz_battle/blob/main/Diamond_Fighters-Quiz_Battle/ScoreManager.cs"
click node_question_mgr "https://github.com/jacob-horndahl-dev/diamond_fighters-quiz_battle/blob/main/Diamond_Fighters-Quiz_Battle/QuestionManager.cs"
click node_question "https://github.com/jacob-horndahl-dev/diamond_fighters-quiz_battle/blob/main/Diamond_Fighters-Quiz_Battle/Question.cs"
click node_multiple "https://github.com/jacob-horndahl-dev/diamond_fighters-quiz_battle/blob/main/Diamond_Fighters-Quiz_Battle/MultipleChoiceQuestion.cs"
click node_truefalse "https://github.com/jacob-horndahl-dev/diamond_fighters-quiz_battle/blob/main/Diamond_Fighters-Quiz_Battle/TrueFalseQuestion.cs"
click node_repository "https://github.com/jacob-horndahl-dev/diamond_fighters-quiz_battle/blob/main/Diamond_Fighters-Quiz_Battle/IQuestionRepository.cs"
click node_json_repo "https://github.com/jacob-horndahl-dev/diamond_fighters-quiz_battle/blob/main/Diamond_Fighters-Quiz_Battle/JsonQuestionRepository.cs"
click node_question_file "https://github.com/jacob-horndahl-dev/diamond_fighters-quiz_battle/blob/main/Diamond_Fighters-Quiz_Battle/Resources/questions.json"
click node_highscore "https://github.com/jacob-horndahl-dev/diamond_fighters-quiz_battle/blob/main/Diamond_Fighters-Quiz_Battle/HighScoreManager.cs"
click node_entry_model "https://github.com/jacob-horndahl-dev/diamond_fighters-quiz_battle/blob/main/Diamond_Fighters-Quiz_Battle/HighScoreEntry.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_program,node_menu toneBlue
class node_game,node_player,node_score,node_question_mgr toneAmber
class node_question,node_multiple,node_truefalse,node_repository,node_json_repo,node_question_file,node_highscore,node_entry_model,node_score_file toneMint
class node_player_actor toneIndigo
```

## Components

### Console entry

- [Application startup](https://github.com/jacob-horndahl-dev/diamond_fighters-quiz_battle/blob/main/Diamond_Fighters-Quiz_Battle/Program.cs): `Diamond_Fighters-Quiz_Battle/Program.cs`
- [Main menu](https://github.com/jacob-horndahl-dev/diamond_fighters-quiz_battle/blob/main/Diamond_Fighters-Quiz_Battle/Menu.cs): `Diamond_Fighters-Quiz_Battle/Menu.cs`

### Quiz gameplay

- [Game rounds](https://github.com/jacob-horndahl-dev/diamond_fighters-quiz_battle/blob/main/Diamond_Fighters-Quiz_Battle/Game.cs): `Diamond_Fighters-Quiz_Battle/Game.cs`
- [Player state](https://github.com/jacob-horndahl-dev/diamond_fighters-quiz_battle/blob/main/Diamond_Fighters-Quiz_Battle/Player.cs): `Diamond_Fighters-Quiz_Battle/Player.cs`
- [Score rules](https://github.com/jacob-horndahl-dev/diamond_fighters-quiz_battle/blob/main/Diamond_Fighters-Quiz_Battle/ScoreManager.cs): `Diamond_Fighters-Quiz_Battle/ScoreManager.cs`
- [Question selection](https://github.com/jacob-horndahl-dev/diamond_fighters-quiz_battle/blob/main/Diamond_Fighters-Quiz_Battle/QuestionManager.cs): `Diamond_Fighters-Quiz_Battle/QuestionManager.cs`

### Questions and records

- [Question model](https://github.com/jacob-horndahl-dev/diamond_fighters-quiz_battle/blob/main/Diamond_Fighters-Quiz_Battle/Question.cs): `Diamond_Fighters-Quiz_Battle/Question.cs`
- [Multiple choice](https://github.com/jacob-horndahl-dev/diamond_fighters-quiz_battle/blob/main/Diamond_Fighters-Quiz_Battle/MultipleChoiceQuestion.cs): `Diamond_Fighters-Quiz_Battle/MultipleChoiceQuestion.cs`
- [True/false](https://github.com/jacob-horndahl-dev/diamond_fighters-quiz_battle/blob/main/Diamond_Fighters-Quiz_Battle/TrueFalseQuestion.cs): `Diamond_Fighters-Quiz_Battle/TrueFalseQuestion.cs`
- [Question repository](https://github.com/jacob-horndahl-dev/diamond_fighters-quiz_battle/blob/main/Diamond_Fighters-Quiz_Battle/IQuestionRepository.cs): `Diamond_Fighters-Quiz_Battle/IQuestionRepository.cs`
- [JSON question loader](https://github.com/jacob-horndahl-dev/diamond_fighters-quiz_battle/blob/main/Diamond_Fighters-Quiz_Battle/JsonQuestionRepository.cs): `Diamond_Fighters-Quiz_Battle/JsonQuestionRepository.cs`
- [Question data](https://github.com/jacob-horndahl-dev/diamond_fighters-quiz_battle/blob/main/Diamond_Fighters-Quiz_Battle/Resources/questions.json): `Diamond_Fighters-Quiz_Battle/Resources/questions.json`
- [High-score manager](https://github.com/jacob-horndahl-dev/diamond_fighters-quiz_battle/blob/main/Diamond_Fighters-Quiz_Battle/HighScoreManager.cs): `Diamond_Fighters-Quiz_Battle/HighScoreManager.cs`
- [High-score entry](https://github.com/jacob-horndahl-dev/diamond_fighters-quiz_battle/blob/main/Diamond_Fighters-Quiz_Battle/HighScoreEntry.cs): `Diamond_Fighters-Quiz_Battle/HighScoreEntry.cs`
- **Score file storage**

### Other components

- **Players**

## Connections

- Players → Main menu: chooses options (evidence: `Diamond_Fighters-Quiz_Battle/Menu.cs`)
- Application startup → Main menu: starts menu (evidence: `Diamond_Fighters-Quiz_Battle/Program.cs`)
- Application startup → High-score manager: creates manager (evidence: `Diamond_Fighters-Quiz_Battle/Program.cs`)
- Main menu → Game rounds: starts game (evidence: `Diamond_Fighters-Quiz_Battle/Menu.cs`)
- Main menu → High-score manager: shows scores (evidence: `Diamond_Fighters-Quiz_Battle/Menu.cs`)
- Main menu → Question selection: creates manager (evidence: `Diamond_Fighters-Quiz_Battle/Menu.cs`)
- Game rounds → Question selection: requests questions (evidence: `Diamond_Fighters-Quiz_Battle/Game.cs`)
- Game rounds → Player state: updates players (evidence: `Diamond_Fighters-Quiz_Battle/Game.cs`)
- Game rounds → Score rules: calculates scoring (evidence: `Diamond_Fighters-Quiz_Battle/Game.cs`)
- Game rounds → High-score manager: saves results (evidence: `Diamond_Fighters-Quiz_Battle/Game.cs`)
- Game rounds → Question model: checks questions (evidence: `Diamond_Fighters-Quiz_Battle/Game.cs`)
- Game rounds → Multiple choice: handles answers (evidence: `Diamond_Fighters-Quiz_Battle/Game.cs`)
- Game rounds → True/false: handles answers (evidence: `Diamond_Fighters-Quiz_Battle/Game.cs`)
- Question selection → Question repository: loads through (evidence: `Diamond_Fighters-Quiz_Battle/QuestionManager.cs`)
- Question selection → JSON question loader: selects implementation (evidence: `Diamond_Fighters-Quiz_Battle/QuestionManager.cs`)
- JSON question loader → Question data: reads JSON (evidence: `Diamond_Fighters-Quiz_Battle/JsonQuestionRepository.cs`)
- JSON question loader → Question model: creates questions (evidence: `Diamond_Fighters-Quiz_Battle/JsonQuestionRepository.cs`)
- JSON question loader → Multiple choice: creates type (evidence: `Diamond_Fighters-Quiz_Battle/JsonQuestionRepository.cs`)
- JSON question loader → True/false: creates type (evidence: `Diamond_Fighters-Quiz_Battle/JsonQuestionRepository.cs`)
- Multiple choice → Question model: inherits model (evidence: `Diamond_Fighters-Quiz_Battle/MultipleChoiceQuestion.cs`)
- True/false → Question model: inherits model (evidence: `Diamond_Fighters-Quiz_Battle/TrueFalseQuestion.cs`)
- Score rules → Player state: ranks players (evidence: `Diamond_Fighters-Quiz_Battle/ScoreManager.cs`)
- High-score manager → High-score entry: loads entries (evidence: `Diamond_Fighters-Quiz_Battle/HighScoreManager.cs`)
- High-score manager → Score file storage: reads and writes (evidence: `Diamond_Fighters-Quiz_Battle/HighScoreManager.cs`)
