# ayush27-cs/ludo architecture

> Architecture diagram of the GitHub repository ayush27-cs/ludo, 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/ayush27-cs/ludo
- Repository: https://github.com/ayush27-cs/ludo

## Overview

The repository is a small collection of standalone Python examples, not a unified Ludo application. The README describes Ludo as the product: players take turns pressing Enter to roll, pieces unlock on a six, positions advance along a track, and reaching the track length wins. The calculator and insertion-sort scripts are separate examples. Edges below reflect only relationships visible in the supplied excerpts.

Main entry points: [`ludo.py`](https://github.com/ayush27-cs/ludo/blob/main/ludo.py) (Turn loop)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ludo_game["Ludo Game"]
  node_ludo_entry["Game entry<br/>[ludo.py]"]
  node_turns["Turn loop<br/>[ludo.py]"]
  node_dice["Dice roll<br/>[ludo.py]"]
  node_piece_state["Piece state<br/>[ludo.py]"]
  node_win_check["Win check<br/>[ludo.py]"]
end

subgraph group_other_examples["Other Examples"]
  node_calculator["Interactive calculator<br/>[learner.py]"]
  node_sort_demo["Insertion sort demo<br/>[hello.py]"]
end

node_player(("Player"))

node_player -->|"starts game"| node_ludo_entry
node_ludo_entry -->|"calls"| node_turns
node_turns -->|"prompts roll"| node_player
node_turns -->|"calls"| node_dice
node_dice -->|"returns result"| node_turns
node_turns -->|"updates position"| node_piece_state
node_turns -->|"checks position"| node_win_check

click node_ludo_entry "https://github.com/ayush27-cs/ludo/blob/main/ludo.py"
click node_turns "https://github.com/ayush27-cs/ludo/blob/main/ludo.py"
click node_dice "https://github.com/ayush27-cs/ludo/blob/main/ludo.py"
click node_piece_state "https://github.com/ayush27-cs/ludo/blob/main/ludo.py"
click node_win_check "https://github.com/ayush27-cs/ludo/blob/main/ludo.py"
click node_calculator "https://github.com/ayush27-cs/ludo/blob/main/learner.py"
click node_sort_demo "https://github.com/ayush27-cs/ludo/blob/main/hello.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_ludo_entry,node_turns,node_dice,node_piece_state,node_win_check toneBlue
class node_calculator,node_sort_demo toneAmber
class node_player toneIndigo
```

## Components

### Ludo Game

- [Game entry](https://github.com/ayush27-cs/ludo/blob/main/ludo.py): `ludo.py`
- [Turn loop](https://github.com/ayush27-cs/ludo/blob/main/ludo.py): `ludo.py`
- [Dice roll](https://github.com/ayush27-cs/ludo/blob/main/ludo.py): `ludo.py`
- [Piece state](https://github.com/ayush27-cs/ludo/blob/main/ludo.py): `ludo.py`
- [Win check](https://github.com/ayush27-cs/ludo/blob/main/ludo.py): `ludo.py`

### Other Examples

- [Interactive calculator](https://github.com/ayush27-cs/ludo/blob/main/learner.py): `learner.py`
- [Insertion sort demo](https://github.com/ayush27-cs/ludo/blob/main/hello.py): `hello.py`

### Other components

- **Player**

## Connections

- Player → Game entry: starts game (evidence: `ludo.py`)
- Game entry → Turn loop: calls (evidence: `ludo.py`)
- Turn loop → Player: prompts roll (evidence: `ludo.py`)
- Turn loop → Dice roll: calls (evidence: `ludo.py`)
- Dice roll → Turn loop: returns result (evidence: `ludo.py`)
- Turn loop → Piece state: updates position (evidence: `ludo.py`)
- Turn loop → Win check: checks position (evidence: `ludo.py`)
