# illoizaur/just_school architecture

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

- Interactive diagram: https://gitdiagram.com/illoizaur/just_school
- Repository: https://github.com/illoizaur/just_school

## Overview

This is a small collection of school examples, centered on a Pygame sandbox game. The principal workflow is selecting a world in the menu, launching the game loop, and playing in a generated world; the game also handles entities, crafting/inventory, rendering, and save/load. A separate Arcade prototype is present. The README describes the repository broadly but provides no further architecture; the graph uses sampled code and SOURCE INDEX references, so unsampled details are omitted.

Main entry points: [`project/game.py`](https://github.com/illoizaur/just_school/blob/main/project/game.py) (Game loop), [`project/main.py`](https://github.com/illoizaur/just_school/blob/main/project/main.py) (Game controller), [`project/menu.py`](https://github.com/illoizaur/just_school/blob/main/project/menu.py) (World menu), [`project/world.py`](https://github.com/illoizaur/just_school/blob/main/project/world.py) (World generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Game entry"]
  node_menu["World menu<br/>[menu.py]"]
  node_controller["Game controller<br/>[main.py]"]
end

subgraph group_runtime["Sandbox runtime"]
  node_loop["Game loop<br/>[game.py]"]
  node_inventory["Inventory and crafting<br/>[game.py]"]
  node_save["Save and load<br/>[game.py]"]
  node_worldsaves[("World save files")]
  node_renderer["World rendering<br/>[game.py]"]
end

subgraph group_worldsys["World and entities"]
  node_generation["World generation<br/>[world.py]"]
  node_terrain["Terrain and biomes<br/>[world.py]"]
  node_water["Water simulation<br/>[world.py]"]
  node_collision["Collision and water checks<br/>[world.py]"]
  node_characters["Player and creatures<br/>[characters.py]"]
end

subgraph group_examples["Other example"]
  node_arcade["Arcade menu prototype<br/>[step1.py]"]
end

node_player(("Player"))

node_player -->|"selects world"| node_menu
node_menu -->|"returns selection"| node_controller
node_controller -->|"opens menu"| node_menu
node_controller -->|"starts game"| node_loop
node_loop -->|"uses world module"| node_generation
node_loop -->|"uses character classes"| node_characters
node_characters -->|"checks collisions and water"| node_collision
node_loop -->|"handles crafting"| node_inventory
node_loop -->|"saves on exit"| node_save
node_save -.->|"reads and writes"| node_worldsaves
node_loop -->|"draws world"| node_renderer
node_generation -->|"generates terrain"| node_terrain
node_loop -.->|"updates and renders water"| node_water

click node_menu "https://github.com/illoizaur/just_school/blob/main/project/menu.py"
click node_controller "https://github.com/illoizaur/just_school/blob/main/project/main.py"
click node_loop "https://github.com/illoizaur/just_school/blob/main/project/game.py"
click node_inventory "https://github.com/illoizaur/just_school/blob/main/project/game.py"
click node_save "https://github.com/illoizaur/just_school/blob/main/project/game.py"
click node_renderer "https://github.com/illoizaur/just_school/blob/main/project/game.py"
click node_generation "https://github.com/illoizaur/just_school/blob/main/project/world.py"
click node_terrain "https://github.com/illoizaur/just_school/blob/main/project/world.py"
click node_water "https://github.com/illoizaur/just_school/blob/main/project/world.py"
click node_collision "https://github.com/illoizaur/just_school/blob/main/project/world.py"
click node_characters "https://github.com/illoizaur/just_school/blob/main/project/characters.py"
click node_arcade "https://github.com/illoizaur/just_school/blob/main/game_arcade/step1.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_menu,node_controller toneBlue
class node_loop,node_inventory,node_save,node_worldsaves,node_renderer toneAmber
class node_generation,node_terrain,node_water,node_collision,node_characters toneMint
class node_arcade toneRose
class node_player toneIndigo
```

## Components

### Game entry

- [World menu](https://github.com/illoizaur/just_school/blob/main/project/menu.py): `project/menu.py`
- [Game controller](https://github.com/illoizaur/just_school/blob/main/project/main.py): `project/main.py`

### Sandbox runtime

- [Game loop](https://github.com/illoizaur/just_school/blob/main/project/game.py): `project/game.py`
- [Inventory and crafting](https://github.com/illoizaur/just_school/blob/main/project/game.py): `project/game.py`
- [Save and load](https://github.com/illoizaur/just_school/blob/main/project/game.py): `project/game.py`
- **World save files**
- [World rendering](https://github.com/illoizaur/just_school/blob/main/project/game.py): `project/game.py`

### World and entities

- [World generation](https://github.com/illoizaur/just_school/blob/main/project/world.py): `project/world.py`
- [Terrain and biomes](https://github.com/illoizaur/just_school/blob/main/project/world.py): `project/world.py`
- [Water simulation](https://github.com/illoizaur/just_school/blob/main/project/world.py): `project/world.py`
- [Collision and water checks](https://github.com/illoizaur/just_school/blob/main/project/world.py): `project/world.py`
- [Player and creatures](https://github.com/illoizaur/just_school/blob/main/project/characters.py): `project/characters.py`

### Other example

- [Arcade menu prototype](https://github.com/illoizaur/just_school/blob/main/game_arcade/step1.py): `game_arcade/step1.py`

### Other components

- **Player**

## Connections

- Player → World menu: selects world
- World menu → Game controller: returns selection (evidence: `project/main.py`)
- Game controller → World menu: opens menu (evidence: `project/main.py`)
- Game controller → Game loop: starts game (evidence: `project/main.py`)
- Game loop → World generation: uses world module (evidence: `project/game.py`)
- Game loop → Player and creatures: uses character classes (evidence: `project/game.py`)
- Player and creatures → Collision and water checks: checks collisions and water (evidence: `project/characters.py`)
- Game loop → Inventory and crafting: handles crafting (evidence: `project/game.py`)
- Game loop → Save and load: saves on exit (evidence: `project/game.py`)
- Save and load → World save files: reads and writes
- Game loop → World rendering: draws world (evidence: `project/game.py`)
- World generation → Terrain and biomes: generates terrain (evidence: `project/world.py`)
- Game loop → Water simulation: updates and renders water (evidence: `project/game.py`)
