# jorgebueno-u/carreras architecture

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

- Interactive diagram: https://gitdiagram.com/jorgebueno-u/carreras
- Repository: https://github.com/jorgebueno-u/carreras

## Overview

Carreras is a small Tkinter desktop game for simulating a ten-vehicle race, setting the lap count and speed, and betting on the winner. The workflow starts from the race controls, advances each vehicle through scheduled movement callbacks, then ranks finish times and reports the outcome. Reset clears the race state and results. All runtime behavior is implemented in one file; the README only names the product, so the map reflects the inspected source rather than additional documented capabilities.

Main entry points: [`GUIA 4.py`](https://github.com/jorgebueno-u/carreras/blob/main/GUIA%204.py) (Vehicle movement)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Race interface"]
  node_app["Race application<br/>[GUIA 4.py]"]
  node_controls["Race controls<br/>[GUIA 4.py]"]
  node_track["Track display<br/>[GUIA 4.py]"]
  node_results["Results table<br/>[GUIA 4.py]"]
end

subgraph group_runtime["Race runtime"]
  node_race["Race state<br/>[GUIA 4.py]"]
  node_movement["Vehicle movement<br/>[GUIA 4.py]"]
  node_completion["Race completion<br/>[GUIA 4.py]"]
  node_ranking["Result ranking<br/>[GUIA 4.py]"]
  node_random["Random timing"]
end

node_player(("Player"))
node_clock["System clock"]

node_player -->|"sets options"| node_controls
node_controls -->|"starts or resets"| node_race
node_race -->|"schedules"| node_movement
node_movement -->|"updates positions"| node_track
node_movement -->|"samples movement"| node_random
node_movement -->|"marks finish"| node_completion
node_completion -->|"records finish time"| node_clock
node_completion -->|"ranks finish times"| node_ranking
node_ranking -->|"displays standings"| node_results
node_completion -->|"reports bet outcome"| node_player
node_player -->|"views race"| node_track
node_player -->|"views standings"| node_results

click node_app "https://github.com/jorgebueno-u/carreras/blob/main/GUIA%204.py"
click node_controls "https://github.com/jorgebueno-u/carreras/blob/main/GUIA%204.py"
click node_track "https://github.com/jorgebueno-u/carreras/blob/main/GUIA%204.py"
click node_results "https://github.com/jorgebueno-u/carreras/blob/main/GUIA%204.py"
click node_race "https://github.com/jorgebueno-u/carreras/blob/main/GUIA%204.py"
click node_movement "https://github.com/jorgebueno-u/carreras/blob/main/GUIA%204.py"
click node_completion "https://github.com/jorgebueno-u/carreras/blob/main/GUIA%204.py"
click node_ranking "https://github.com/jorgebueno-u/carreras/blob/main/GUIA%204.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_app,node_controls,node_track,node_results toneBlue
class node_race,node_movement,node_completion,node_ranking,node_random toneAmber
class node_player,node_clock toneIndigo
```

## Components

### Race interface

- [Race application](https://github.com/jorgebueno-u/carreras/blob/main/GUIA%204.py): `GUIA 4.py`
- [Race controls](https://github.com/jorgebueno-u/carreras/blob/main/GUIA%204.py): `GUIA 4.py`
- [Track display](https://github.com/jorgebueno-u/carreras/blob/main/GUIA%204.py): `GUIA 4.py`
- [Results table](https://github.com/jorgebueno-u/carreras/blob/main/GUIA%204.py): `GUIA 4.py`

### Race runtime

- [Race state](https://github.com/jorgebueno-u/carreras/blob/main/GUIA%204.py): `GUIA 4.py`
- [Vehicle movement](https://github.com/jorgebueno-u/carreras/blob/main/GUIA%204.py): `GUIA 4.py`
- [Race completion](https://github.com/jorgebueno-u/carreras/blob/main/GUIA%204.py): `GUIA 4.py`
- [Result ranking](https://github.com/jorgebueno-u/carreras/blob/main/GUIA%204.py): `GUIA 4.py`
- **Random timing**

### Other components

- **Player**
- **System clock**

## Connections

- Player → Race controls: sets options (evidence: `GUIA 4.py`)
- Race controls → Race state: starts or resets (evidence: `GUIA 4.py`)
- Race state → Vehicle movement: schedules (evidence: `GUIA 4.py`)
- Vehicle movement → Track display: updates positions (evidence: `GUIA 4.py`)
- Vehicle movement → Random timing: samples movement (evidence: `GUIA 4.py`)
- Vehicle movement → Race completion: marks finish (evidence: `GUIA 4.py`)
- Race completion → System clock: records finish time (evidence: `GUIA 4.py`)
- Race completion → Result ranking: ranks finish times (evidence: `GUIA 4.py`)
- Result ranking → Results table: displays standings (evidence: `GUIA 4.py`)
- Race completion → Player: reports bet outcome (evidence: `GUIA 4.py`)
- Player → Track display: views race (evidence: `GUIA 4.py`)
- Player → Results table: views standings (evidence: `GUIA 4.py`)
