# davidgamzu/wog architecture

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

- Interactive diagram: https://gitdiagram.com/davidgamzu/wog
- Repository: https://github.com/davidgamzu/wog

## Overview

World of Games is a command-line Python game with three difficulty-based modes. The user starts at `main.py`, enters their name and selects a game and difficulty in `app.py`; the selected game returns a win/loss result, which the app displays and records on a win. A separate Flask score page reads the same score file. The graph preserves the three documented game modes and the score viewer; the currency-conversion dependency is shown as external. Relationships reflect the provided excerpts, not unsampled source.

Main entry points: [`app.py`](https://github.com/davidgamzu/wog/blob/master/app.py) (Game menu), [`utils.py`](https://github.com/davidgamzu/wog/blob/master/utils.py) (Input and results), [`games/currency_roulette_game.py`](https://github.com/davidgamzu/wog/blob/master/games/currency_roulette_game.py) (Currency roulette), [`main.py`](https://github.com/davidgamzu/wog/blob/master/main.py) (CLI entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["Command-line flow"]
  node_entry["CLI entry<br/>[main.py]"]
  node_game_app["Game menu<br/>[app.py]"]
  node_utils["Input and results<br/>[utils.py]"]
end

subgraph group_games["Game modes"]
  node_memory["Memory game<br/>[memory_game.py]"]
  node_guess["Guess game<br/>[guess_game.py]"]
  node_currency["Currency roulette"]
end

subgraph group_scoring["Score recording"]
  node_score_logic["Score update<br/>[score.py]"]
  node_score_file[("Scores file<br/>[Scores.txt]")]
end

subgraph group_viewer["Score viewer"]
  node_web_app["Score web app<br/>[main_score.py]"]
end

node_player(("Player"))
node_fx["Currency converter"]
node_web_user(("Web visitor"))

node_player -->|"starts"| node_entry
node_entry -->|"calls"| node_game_app
node_game_app -->|"prompts"| node_player
node_game_app -->|"gets input"| node_utils
node_game_app -->|"runs"| node_memory
node_game_app -->|"runs"| node_guess
node_game_app -->|"runs"| node_currency
node_memory -->|"uses input"| node_utils
node_guess -->|"uses input"| node_utils
node_currency -->|"validates input"| node_utils
node_currency -->|"converts currency"| node_fx
node_game_app -->|"shows result"| node_utils
node_utils -->|"records win"| node_score_logic
node_score_logic -->|"reads and writes"| node_score_file
node_web_user -->|"requests page"| node_web_app
node_web_app -->|"reads score"| node_score_file

click node_entry "https://github.com/davidgamzu/wog/blob/master/main.py"
click node_game_app "https://github.com/davidgamzu/wog/blob/master/app.py"
click node_utils "https://github.com/davidgamzu/wog/blob/master/utils.py"
click node_memory "https://github.com/davidgamzu/wog/blob/master/games/memory_game.py"
click node_guess "https://github.com/davidgamzu/wog/blob/master/games/guess_game.py"
click node_currency "https://github.com/davidgamzu/wog/blob/master/games/currency_roulette_game.py"
click node_score_logic "https://github.com/davidgamzu/wog/blob/master/score.py"
click node_score_file "https://github.com/davidgamzu/wog/blob/master/Scores.txt"
click node_web_app "https://github.com/davidgamzu/wog/blob/master/main_score.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,node_game_app,node_utils toneBlue
class node_memory,node_guess,node_currency toneAmber
class node_score_logic,node_score_file toneMint
class node_web_app toneRose
class node_player,node_fx,node_web_user toneIndigo
```

## Components

### Command-line flow

- [CLI entry](https://github.com/davidgamzu/wog/blob/master/main.py): `main.py`
- [Game menu](https://github.com/davidgamzu/wog/blob/master/app.py): `app.py`
- [Input and results](https://github.com/davidgamzu/wog/blob/master/utils.py): `utils.py`

### Game modes

- [Memory game](https://github.com/davidgamzu/wog/blob/master/games/memory_game.py): `games/memory_game.py`
- [Guess game](https://github.com/davidgamzu/wog/blob/master/games/guess_game.py): `games/guess_game.py`
- [Currency roulette](https://github.com/davidgamzu/wog/blob/master/games/currency_roulette_game.py): `games/currency_roulette_game.py`

### Score recording

- [Score update](https://github.com/davidgamzu/wog/blob/master/score.py): `score.py`
- [Scores file](https://github.com/davidgamzu/wog/blob/master/Scores.txt): `Scores.txt`

### Score viewer

- [Score web app](https://github.com/davidgamzu/wog/blob/master/main_score.py): `main_score.py`

### Other components

- **Player**
- **Currency converter**
- **Web visitor**

## Connections

- Player → CLI entry: starts (evidence: `main.py`)
- CLI entry → Game menu: calls (evidence: `main.py`)
- Game menu → Player: prompts (evidence: `app.py`)
- Game menu → Input and results: gets input (evidence: `app.py`)
- Game menu → Memory game: runs (evidence: `app.py`)
- Game menu → Guess game: runs (evidence: `app.py`)
- Game menu → Currency roulette: runs (evidence: `app.py`)
- Memory game → Input and results: uses input (evidence: `games/memory_game.py`)
- Guess game → Input and results: uses input (evidence: `games/guess_game.py`)
- Currency roulette → Input and results: validates input (evidence: `games/currency_roulette_game.py`)
- Currency roulette → Currency converter: converts currency (evidence: `games/currency_roulette_game.py`)
- Game menu → Input and results: shows result (evidence: `app.py`)
- Input and results → Score update: records win (evidence: `utils.py`)
- Score update → Scores file: reads and writes (evidence: `score.py`)
- Web visitor → Score web app: requests page (evidence: `main_score.py`)
- Score web app → Scores file: reads score (evidence: `main_score.py`)
