# ghassen-saidi/educational_games_collection architecture

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

- Interactive diagram: https://gitdiagram.com/ghassen-saidi/educational_games_collection
- Repository: https://github.com/ghassen-saidi/educational_games_collection

## Overview

This repository is a collection of seven independent Pygame educational games, not one shared application. Players launch a game and interact with its learning activity to receive feedback or a score. The hand-tracking Fruit Ninja game has the clearest internal layers: its entry point coordinates input and gameplay, while the game manager creates and updates fruit and bomb entities. The README documents each game’s learning focus; links among unsampled standalone game internals are omitted.

Main entry points: [`hand_fruit_ninja_py/main.py`](https://github.com/ghassen-saidi/educational_games_collection/blob/main/hand_fruit_ninja_py/main.py) (Game Entry), [`hand_fruit_ninja_py/game_manager.py`](https://github.com/ghassen-saidi/educational_games_collection/blob/main/hand_fruit_ninja_py/game_manager.py) (Game Manager), [`hand_fruit_ninja_py/config.py`](https://github.com/ghassen-saidi/educational_games_collection/blob/main/hand_fruit_ninja_py/config.py) (Game Settings), [`hand_fruit_ninja_py/hand_tracker.py`](https://github.com/ghassen-saidi/educational_games_collection/blob/main/hand_fruit_ninja_py/hand_tracker.py) (Hand Tracker)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_hand["Hand Fruit Ninja"]
  node_hand_main["Game Entry<br/>[main.py]"]
  node_hand_manager["Game Manager<br/>[game_manager.py]"]
  node_hand_tracker["Hand Tracker<br/>[hand_tracker.py]"]
  node_fruit["Fruit Physics<br/>[fruit.py]"]
  node_bomb["Bomb Effects<br/>[bomb.py]"]
  node_config["Game Settings<br/>[config.py]"]
  node_utils["Utilities<br/>[utils.py]"]
end

subgraph group_standalone["Standalone Games"]
  node_word_worm["Hungry Word Worm"]
  node_baseball["Math Baseball<br/>[math_baseball.py]"]
  node_memory["Memory Matrix<br/>[Memory_Matrix.py]"]
  node_rhythm["Rhythm Frog<br/>[Rhythm_Frog.py]"]
  node_solar["Solar Snap<br/>[Solar_Snap.py]"]
end

subgraph group_quiz["Quiz Game"]
  node_quiz_main["Quiz Game<br/>[main.py]"]
  node_questions["Question Data<br/>[questions.json]"]
end

node_player(("Player"))
node_camera["Webcam"]
node_mediapipe["MediaPipe Hands"]

node_player -->|"launches"| node_hand_main
node_hand_main -->|"creates and updates"| node_hand_manager
node_hand_main -->|"reads landmarks"| node_hand_tracker
node_hand_main -->|"reads settings"| node_config
node_hand_tracker -->|"captures frames"| node_camera
node_hand_tracker -->|"processes landmarks"| node_mediapipe
node_hand_manager -->|"creates and updates"| node_fruit
node_hand_manager -->|"creates bombs"| node_bomb
node_hand_manager -->|"reads settings"| node_config
node_bomb -->|"inherits behavior"| node_fruit
node_fruit -->|"reads settings"| node_config
node_bomb -->|"reads settings"| node_config
node_player -->|"launches"| node_word_worm
node_player -->|"launches"| node_baseball
node_player -->|"launches"| node_memory
node_player -->|"launches"| node_rhythm
node_player -->|"launches"| node_solar
node_player -->|"launches"| node_quiz_main
node_quiz_main -->|"loads questions"| node_questions

click node_hand_main "https://github.com/ghassen-saidi/educational_games_collection/blob/main/hand_fruit_ninja_py/main.py"
click node_hand_manager "https://github.com/ghassen-saidi/educational_games_collection/blob/main/hand_fruit_ninja_py/game_manager.py"
click node_hand_tracker "https://github.com/ghassen-saidi/educational_games_collection/blob/main/hand_fruit_ninja_py/hand_tracker.py"
click node_fruit "https://github.com/ghassen-saidi/educational_games_collection/blob/main/hand_fruit_ninja_py/fruit.py"
click node_bomb "https://github.com/ghassen-saidi/educational_games_collection/blob/main/hand_fruit_ninja_py/bomb.py"
click node_config "https://github.com/ghassen-saidi/educational_games_collection/blob/main/hand_fruit_ninja_py/config.py"
click node_utils "https://github.com/ghassen-saidi/educational_games_collection/blob/main/hand_fruit_ninja_py/utils.py"
click node_word_worm "https://github.com/ghassen-saidi/educational_games_collection/blob/main/Hungry%20Word%20Worm/Hungry%20Word%20Worm.py"
click node_baseball "https://github.com/ghassen-saidi/educational_games_collection/blob/main/Math%20Baseball%20Pitcher/math_baseball.py"
click node_memory "https://github.com/ghassen-saidi/educational_games_collection/blob/main/Memory%20Matrix/Memory_Matrix.py"
click node_rhythm "https://github.com/ghassen-saidi/educational_games_collection/blob/main/Rhythm%20Frog/Rhythm_Frog.py"
click node_solar "https://github.com/ghassen-saidi/educational_games_collection/blob/main/Solar%20Snap/Solar_Snap.py"
click node_quiz_main "https://github.com/ghassen-saidi/educational_games_collection/blob/main/quiz/main.py"
click node_questions "https://github.com/ghassen-saidi/educational_games_collection/blob/main/quiz/questions.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_hand_main,node_hand_manager,node_hand_tracker,node_fruit,node_bomb,node_config,node_utils toneBlue
class node_word_worm,node_baseball,node_memory,node_rhythm,node_solar toneAmber
class node_quiz_main,node_questions,node_mediapipe toneMint
class node_player,node_camera toneIndigo
```

## Components

### Hand Fruit Ninja

- [Game Entry](https://github.com/ghassen-saidi/educational_games_collection/blob/main/hand_fruit_ninja_py/main.py): `hand_fruit_ninja_py/main.py`
- [Game Manager](https://github.com/ghassen-saidi/educational_games_collection/blob/main/hand_fruit_ninja_py/game_manager.py): `hand_fruit_ninja_py/game_manager.py`
- [Hand Tracker](https://github.com/ghassen-saidi/educational_games_collection/blob/main/hand_fruit_ninja_py/hand_tracker.py): `hand_fruit_ninja_py/hand_tracker.py`
- [Fruit Physics](https://github.com/ghassen-saidi/educational_games_collection/blob/main/hand_fruit_ninja_py/fruit.py): `hand_fruit_ninja_py/fruit.py`
- [Bomb Effects](https://github.com/ghassen-saidi/educational_games_collection/blob/main/hand_fruit_ninja_py/bomb.py): `hand_fruit_ninja_py/bomb.py`
- [Game Settings](https://github.com/ghassen-saidi/educational_games_collection/blob/main/hand_fruit_ninja_py/config.py): `hand_fruit_ninja_py/config.py`
- [Utilities](https://github.com/ghassen-saidi/educational_games_collection/blob/main/hand_fruit_ninja_py/utils.py): `hand_fruit_ninja_py/utils.py`

### Standalone Games

- [Hungry Word Worm](https://github.com/ghassen-saidi/educational_games_collection/blob/main/Hungry%20Word%20Worm/Hungry%20Word%20Worm.py): `Hungry Word Worm/Hungry Word Worm.py`
- [Math Baseball](https://github.com/ghassen-saidi/educational_games_collection/blob/main/Math%20Baseball%20Pitcher/math_baseball.py): `Math Baseball Pitcher/math_baseball.py`
- [Memory Matrix](https://github.com/ghassen-saidi/educational_games_collection/blob/main/Memory%20Matrix/Memory_Matrix.py): `Memory Matrix/Memory_Matrix.py`
- [Rhythm Frog](https://github.com/ghassen-saidi/educational_games_collection/blob/main/Rhythm%20Frog/Rhythm_Frog.py): `Rhythm Frog/Rhythm_Frog.py`
- [Solar Snap](https://github.com/ghassen-saidi/educational_games_collection/blob/main/Solar%20Snap/Solar_Snap.py): `Solar Snap/Solar_Snap.py`

### Quiz Game

- [Quiz Game](https://github.com/ghassen-saidi/educational_games_collection/blob/main/quiz/main.py): `quiz/main.py`
- [Question Data](https://github.com/ghassen-saidi/educational_games_collection/blob/main/quiz/questions.json): `quiz/questions.json`

### Other components

- **Player**
- **Webcam**
- **MediaPipe Hands**

## Connections

- Player → Game Entry: launches (evidence: `README.md`)
- Game Entry → Game Manager: creates and updates (evidence: `hand_fruit_ninja_py/main.py`)
- Game Entry → Hand Tracker: reads landmarks (evidence: `hand_fruit_ninja_py/main.py`)
- Game Entry → Game Settings: reads settings (evidence: `hand_fruit_ninja_py/main.py`)
- Hand Tracker → Webcam: captures frames (evidence: `hand_fruit_ninja_py/hand_tracker.py`)
- Hand Tracker → MediaPipe Hands: processes landmarks (evidence: `hand_fruit_ninja_py/hand_tracker.py`)
- Game Manager → Fruit Physics: creates and updates (evidence: `hand_fruit_ninja_py/game_manager.py`)
- Game Manager → Bomb Effects: creates bombs (evidence: `hand_fruit_ninja_py/game_manager.py`)
- Game Manager → Game Settings: reads settings (evidence: `hand_fruit_ninja_py/game_manager.py`)
- Bomb Effects → Fruit Physics: inherits behavior (evidence: `hand_fruit_ninja_py/bomb.py`)
- Fruit Physics → Game Settings: reads settings (evidence: `hand_fruit_ninja_py/fruit.py`)
- Bomb Effects → Game Settings: reads settings (evidence: `hand_fruit_ninja_py/bomb.py`)
- Player → Hungry Word Worm: launches (evidence: `README.md`)
- Player → Math Baseball: launches (evidence: `README.md`)
- Player → Memory Matrix: launches (evidence: `README.md`)
- Player → Rhythm Frog: launches (evidence: `README.md`)
- Player → Solar Snap: launches (evidence: `README.md`)
- Player → Quiz Game: launches (evidence: `README.md`)
- Quiz Game → Question Data: loads questions (evidence: `quiz/main.py`)
