# mmmmmmmaria/marioo_kart architecture

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

- Interactive diagram: https://gitdiagram.com/mmmmmmmaria/marioo_kart
- Repository: https://github.com/mmmmmmmaria/marioo_kart

## Overview

This is a small Pygame 2D racing game. The player starts at a menu, presses Enter to load a circuit and spawn a car, then accelerates with the Up key while the game loop updates and renders the race. The model separates circuit tiles and car movement; the view draws the menu, circuit, and car. The README is empty, so the graph reflects the supplied source excerpts and does not infer additional racing features.

Main entry points: [`controller/game_controller.py`](https://github.com/mmmmmmmaria/marioo_kart/blob/main/controller/game_controller.py) (Game controller), [`model/game_model.py`](https://github.com/mmmmmmmaria/marioo_kart/blob/main/model/game_model.py) (Game model), [`view/game_view.py`](https://github.com/mmmmmmmaria/marioo_kart/blob/main/view/game_view.py) (Game view), [`model/car.py`](https://github.com/mmmmmmmaria/marioo_kart/blob/main/model/car.py) (Player car)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_control["Game control"]
  node_entry["Game entry<br/>[main.py]"]
  node_controller["Game controller<br/>[game_controller.py]"]
  node_input["Input handler<br/>[input_handler.py]"]
end

subgraph group_model["Game model"]
  node_game_model["Game model<br/>[game_model.py]"]
  node_circuit["Circuit grid<br/>[circuit.py]"]
  node_tile["Road tile<br/>[road_tile.py]"]
  node_car["Player car<br/>[car.py]"]
end

subgraph group_view["Rendering"]
  node_game_view["Game view<br/>[game_view.py]"]
end

node_player(("Player"))

node_player -->|"presses keys"| node_controller
node_entry -->|"starts"| node_controller
node_controller -->|"creates"| node_game_model
node_controller -->|"creates"| node_game_view
node_controller -->|"creates"| node_input
node_controller -->|"loads circuit"| node_game_model
node_controller -->|"reads controls"| node_input
node_input -->|"reads keys"| node_player
node_controller -->|"applies acceleration"| node_car
node_controller -->|"updates"| node_game_model
node_controller -->|"renders"| node_game_view
node_game_model -->|"creates grid"| node_tile
node_game_model -->|"creates"| node_circuit
node_game_model -->|"spawns"| node_car
node_game_model -->|"updates position"| node_car
node_game_view -->|"reads state"| node_game_model
node_game_view -->|"draws sprites"| node_tile
node_game_view -->|"draws sprite"| node_car
node_circuit -->|"stores grid"| node_tile

click node_entry "https://github.com/mmmmmmmaria/marioo_kart/blob/main/main.py"
click node_controller "https://github.com/mmmmmmmaria/marioo_kart/blob/main/controller/game_controller.py"
click node_input "https://github.com/mmmmmmmaria/marioo_kart/blob/main/controller/input_handler.py"
click node_game_model "https://github.com/mmmmmmmaria/marioo_kart/blob/main/model/game_model.py"
click node_circuit "https://github.com/mmmmmmmaria/marioo_kart/blob/main/model/circuit.py"
click node_tile "https://github.com/mmmmmmmaria/marioo_kart/blob/main/model/road_tile.py"
click node_car "https://github.com/mmmmmmmaria/marioo_kart/blob/main/model/car.py"
click node_game_view "https://github.com/mmmmmmmaria/marioo_kart/blob/main/view/game_view.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_controller,node_input toneBlue
class node_game_model,node_circuit,node_tile,node_car toneAmber
class node_game_view toneMint
class node_player toneIndigo
```

## Components

### Game control

- [Game entry](https://github.com/mmmmmmmaria/marioo_kart/blob/main/main.py): `main.py`
- [Game controller](https://github.com/mmmmmmmaria/marioo_kart/blob/main/controller/game_controller.py): `controller/game_controller.py`
- [Input handler](https://github.com/mmmmmmmaria/marioo_kart/blob/main/controller/input_handler.py): `controller/input_handler.py`

### Game model

- [Game model](https://github.com/mmmmmmmaria/marioo_kart/blob/main/model/game_model.py): `model/game_model.py`
- [Circuit grid](https://github.com/mmmmmmmaria/marioo_kart/blob/main/model/circuit.py): `model/circuit.py`
- [Road tile](https://github.com/mmmmmmmaria/marioo_kart/blob/main/model/road_tile.py): `model/road_tile.py`
- [Player car](https://github.com/mmmmmmmaria/marioo_kart/blob/main/model/car.py): `model/car.py`

### Rendering

- [Game view](https://github.com/mmmmmmmaria/marioo_kart/blob/main/view/game_view.py): `view/game_view.py`

### Other components

- **Player**

## Connections

- Player → Game controller: presses keys (evidence: `controller/game_controller.py`)
- Game entry → Game controller: starts (evidence: `main.py`)
- Game controller → Game model: creates (evidence: `controller/game_controller.py`)
- Game controller → Game view: creates (evidence: `controller/game_controller.py`)
- Game controller → Input handler: creates (evidence: `controller/game_controller.py`)
- Game controller → Game model: loads circuit (evidence: `controller/game_controller.py`)
- Game controller → Input handler: reads controls (evidence: `controller/game_controller.py`)
- Input handler → Player: reads keys (evidence: `controller/input_handler.py`)
- Game controller → Player car: applies acceleration (evidence: `controller/game_controller.py`)
- Game controller → Game model: updates (evidence: `controller/game_controller.py`)
- Game controller → Game view: renders (evidence: `controller/game_controller.py`)
- Game model → Road tile: creates grid (evidence: `model/game_model.py`)
- Game model → Circuit grid: creates (evidence: `model/game_model.py`)
- Game model → Player car: spawns (evidence: `model/game_model.py`)
- Game model → Player car: updates position (evidence: `model/game_model.py`)
- Game view → Game model: reads state (evidence: `view/game_view.py`)
- Game view → Road tile: draws sprites (evidence: `view/game_view.py`)
- Game view → Player car: draws sprite (evidence: `view/game_view.py`)
- Circuit grid → Road tile: stores grid (evidence: `model/circuit.py`)
