# wilsonsoledad/exposimu2026-ultimonodo architecture

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

- Interactive diagram: https://gitdiagram.com/wilsonsoledad/exposimu2026-ultimonodo
- Repository: https://github.com/wilsonsoledad/exposimu2026-ultimonodo

## Overview

Último Nodo is a Pygame tower-defense game whose levels activate simulation models as threats and defenses. The visible runtime entry point creates separate random streams; its model adapter imports the standalone queue, walk, and SIR modules. Configuration defines level progression and model parameters, while README documents the agent model and a pending Monte Carlo predictor. The tree omits the referenced level and UI implementation, so their internal gameplay calls cannot be traced here; the graph shows only supported relationships.

Main entry points: [`juego/main.py`](https://github.com/wilsonsoledad/exposimu2026-ultimonodo/blob/main/juego/main.py) (Game loop), [`juego/fuentes.py`](https://github.com/wilsonsoledad/exposimu2026-ultimonodo/blob/main/juego/fuentes.py) (Model imports), [`juego/aleatorio.py`](https://github.com/wilsonsoledad/exposimu2026-ultimonodo/blob/main/juego/aleatorio.py) (Random streams), [`juego/config.py`](https://github.com/wilsonsoledad/exposimu2026-ultimonodo/blob/main/juego/config.py) (Level configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_game["Game runtime"]
  node_entry["Game loop<br/>[main.py]"]
  node_level_config["Level configuration<br/>[config.py]"]
end

subgraph group_adapters["Randomness and adapters"]
  node_random_streams["Random streams<br/>[aleatorio.py]"]
  node_model_adapter["Model imports<br/>[fuentes.py]"]
end

subgraph group_models["Simulation models"]
  node_queue_model["Queue simulation"]
  node_walk_model["Random walks"]
  node_agent_model["Agent swarm"]
  node_sir_model["SIR dynamics"]
  node_monte_carlo["Monte Carlo predictor<br/>[config.py]"]
end

node_player(("Player"))

node_player -->|"plays"| node_entry
node_entry -->|"creates streams"| node_random_streams
node_entry -->|"reads settings"| node_level_config
node_random_streams -->|"imports models"| node_model_adapter
node_model_adapter -->|"imports"| node_queue_model
node_model_adapter -->|"imports"| node_walk_model
node_model_adapter -->|"imports"| node_sir_model
node_entry -.->|"integrates"| node_agent_model
node_entry -.->|"plans predictor"| node_monte_carlo

click node_entry "https://github.com/wilsonsoledad/exposimu2026-ultimonodo/blob/main/juego/main.py"
click node_level_config "https://github.com/wilsonsoledad/exposimu2026-ultimonodo/blob/main/juego/config.py"
click node_random_streams "https://github.com/wilsonsoledad/exposimu2026-ultimonodo/blob/main/juego/aleatorio.py"
click node_model_adapter "https://github.com/wilsonsoledad/exposimu2026-ultimonodo/blob/main/juego/fuentes.py"
click node_queue_model "https://github.com/wilsonsoledad/exposimu2026-ultimonodo/blob/main/modulos/carrillo_modelo1_colas.py"
click node_walk_model "https://github.com/wilsonsoledad/exposimu2026-ultimonodo/blob/main/modulos/carrillo_modelo2_caminatas.py"
click node_agent_model "https://github.com/wilsonsoledad/exposimu2026-ultimonodo/blob/main/modulos/Paredes_Carrillo_Soledad_Suarez_modelo4_agentes.py"
click node_sir_model "https://github.com/wilsonsoledad/exposimu2026-ultimonodo/blob/main/modulos/Paredes_Carrillo_Soledad_Suarez_modelo5_sir.py"
click node_monte_carlo "https://github.com/wilsonsoledad/exposimu2026-ultimonodo/blob/main/juego/config.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_level_config toneBlue
class node_random_streams,node_model_adapter toneAmber
class node_queue_model,node_walk_model,node_agent_model,node_sir_model,node_monte_carlo toneMint
class node_player toneIndigo
```

## Components

### Game runtime

- [Game loop](https://github.com/wilsonsoledad/exposimu2026-ultimonodo/blob/main/juego/main.py): `juego/main.py`
- [Level configuration](https://github.com/wilsonsoledad/exposimu2026-ultimonodo/blob/main/juego/config.py): `juego/config.py`

### Randomness and adapters

- [Random streams](https://github.com/wilsonsoledad/exposimu2026-ultimonodo/blob/main/juego/aleatorio.py): `juego/aleatorio.py`
- [Model imports](https://github.com/wilsonsoledad/exposimu2026-ultimonodo/blob/main/juego/fuentes.py): `juego/fuentes.py`

### Simulation models

- [Queue simulation](https://github.com/wilsonsoledad/exposimu2026-ultimonodo/blob/main/modulos/carrillo_modelo1_colas.py): `modulos/carrillo_modelo1_colas.py`
- [Random walks](https://github.com/wilsonsoledad/exposimu2026-ultimonodo/blob/main/modulos/carrillo_modelo2_caminatas.py): `modulos/carrillo_modelo2_caminatas.py`
- [Agent swarm](https://github.com/wilsonsoledad/exposimu2026-ultimonodo/blob/main/modulos/Paredes_Carrillo_Soledad_Suarez_modelo4_agentes.py): `modulos/Paredes_Carrillo_Soledad_Suarez_modelo4_agentes.py`
- [SIR dynamics](https://github.com/wilsonsoledad/exposimu2026-ultimonodo/blob/main/modulos/Paredes_Carrillo_Soledad_Suarez_modelo5_sir.py): `modulos/Paredes_Carrillo_Soledad_Suarez_modelo5_sir.py`
- [Monte Carlo predictor](https://github.com/wilsonsoledad/exposimu2026-ultimonodo/blob/main/juego/config.py): `juego/config.py`

### Other components

- **Player**

## Connections

- Player → Game loop: plays (evidence: `README.md`)
- Game loop → Random streams: creates streams (evidence: `juego/main.py`)
- Game loop → Level configuration: reads settings (evidence: `juego/main.py`)
- Random streams → Model imports: imports models (evidence: `juego/aleatorio.py`)
- Model imports → Queue simulation: imports (evidence: `juego/fuentes.py`)
- Model imports → Random walks: imports (evidence: `juego/fuentes.py`)
- Model imports → SIR dynamics: imports (evidence: `juego/fuentes.py`)
- Game loop → Agent swarm: integrates (evidence: `README.md`)
- Game loop → Monte Carlo predictor: plans predictor (evidence: `README.md`)
