# tegetgoofficial-bot/small-game-engine architecture

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

- Interactive diagram: https://gitdiagram.com/tegetgoofficial-bot/small-game-engine
- Repository: https://github.com/tegetgoofficial-bot/small-game-engine

## Overview

This is a terminal arcade launcher: the player enters a name, browses a cyclic game menu, launches a selected game, and returns to the menu when play ends. Main.py owns menu input, resizing, credits, and game dispatch; PythonGames/Games.py supplies Apple Catcher, Snake, and Connect Four, while GameEngine/Engine.py provides shared game-loop and player functionality. The engine excerpt shows JSON-backed player data handling, but does not establish that saved_progress.json is its target, so that relationship is not drawn. The game-module excerpt is partial; documented capabilities are retained without inferring unshown calls.

Main entry points: [`PythonGames/Games.py`](https://github.com/tegetgoofficial-bot/small-game-engine/blob/Main/PythonGames/Games.py) (Game Catalog), [`Main.py`](https://github.com/tegetgoofficial-bot/small-game-engine/blob/Main/Main.py) (Menu & Controls), [`GameEngine/Engine.py`](https://github.com/tegetgoofficial-bot/small-game-engine/blob/Main/GameEngine/Engine.py) (Game Runtime)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_launcher["Launcher"]
  node_menu["Menu &amp; Controls<br/>[Main.py]"]
end

subgraph group_games["Games"]
  node_game_catalog["Game Catalog<br/>[Games.py]"]
  node_apple_catcher["Apple Catcher<br/>[Games.py]"]
  node_snake["Snake<br/>[Games.py]"]
  node_connect_four["Connect Four<br/>[Games.py]"]
end

subgraph group_engine["Game Engine"]
  node_game_runtime["Game Runtime<br/>[Engine.py]"]
  node_player_progress["Player Progress<br/>[Engine.py]"]
end

node_player(("Player"))
node_saved_progress[("Progress File")]

node_player -->|"enters name"| node_menu
node_menu -->|"selects game"| node_game_catalog
node_menu -->|"runs game"| node_game_runtime
node_game_catalog -->|"offers"| node_apple_catcher
node_game_catalog -->|"offers"| node_snake
node_game_catalog -->|"offers"| node_connect_four
node_game_catalog -->|"uses engine"| node_game_runtime
node_player -.->|"plays as"| node_player_progress

click node_menu "https://github.com/tegetgoofficial-bot/small-game-engine/blob/Main/Main.py"
click node_game_catalog "https://github.com/tegetgoofficial-bot/small-game-engine/blob/Main/PythonGames/Games.py"
click node_apple_catcher "https://github.com/tegetgoofficial-bot/small-game-engine/blob/Main/PythonGames/Games.py"
click node_snake "https://github.com/tegetgoofficial-bot/small-game-engine/blob/Main/PythonGames/Games.py"
click node_connect_four "https://github.com/tegetgoofficial-bot/small-game-engine/blob/Main/PythonGames/Games.py"
click node_game_runtime "https://github.com/tegetgoofficial-bot/small-game-engine/blob/Main/GameEngine/Engine.py"
click node_player_progress "https://github.com/tegetgoofficial-bot/small-game-engine/blob/Main/GameEngine/Engine.py"
click node_saved_progress "https://github.com/tegetgoofficial-bot/small-game-engine/blob/Main/saved_progress.json"

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_menu toneBlue
class node_game_catalog,node_apple_catcher,node_snake,node_connect_four,node_saved_progress toneAmber
class node_game_runtime,node_player_progress toneMint
class node_player toneIndigo
```

## Components

### Launcher

- [Menu & Controls](https://github.com/tegetgoofficial-bot/small-game-engine/blob/Main/Main.py): `Main.py`

### Games

- [Game Catalog](https://github.com/tegetgoofficial-bot/small-game-engine/blob/Main/PythonGames/Games.py): `PythonGames/Games.py`
- [Apple Catcher](https://github.com/tegetgoofficial-bot/small-game-engine/blob/Main/PythonGames/Games.py): `PythonGames/Games.py`
- [Snake](https://github.com/tegetgoofficial-bot/small-game-engine/blob/Main/PythonGames/Games.py): `PythonGames/Games.py`
- [Connect Four](https://github.com/tegetgoofficial-bot/small-game-engine/blob/Main/PythonGames/Games.py): `PythonGames/Games.py`

### Game Engine

- [Game Runtime](https://github.com/tegetgoofficial-bot/small-game-engine/blob/Main/GameEngine/Engine.py): `GameEngine/Engine.py`
- [Player Progress](https://github.com/tegetgoofficial-bot/small-game-engine/blob/Main/GameEngine/Engine.py): `GameEngine/Engine.py`

### Other components

- **Player**
- [Progress File](https://github.com/tegetgoofficial-bot/small-game-engine/blob/Main/saved_progress.json): `saved_progress.json`

## Connections

- Player → Menu & Controls: enters name (evidence: `Main.py`)
- Menu & Controls → Game Catalog: selects game (evidence: `Main.py`)
- Menu & Controls → Game Runtime: runs game (evidence: `Main.py`)
- Game Catalog → Apple Catcher: offers (evidence: `Main.py`)
- Game Catalog → Snake: offers (evidence: `Main.py`)
- Game Catalog → Connect Four: offers (evidence: `Main.py`)
- Game Catalog → Game Runtime: uses engine (evidence: `PythonGames/Games.py`)
- Player → Player Progress: plays as (evidence: `README.md`)
