# gabrielmartinezcorrea06-pixel/parchis architecture

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

- Interactive diagram: https://gitdiagram.com/gabrielmartinezcorrea06-pixel/parchis
- Repository: https://github.com/gabrielmartinezcorrea06-pixel/parchis

## Overview

Parchís is a console-based board game. Partida.cs runs the menu, registers players, manages turns and prompts for moves; Tablero.cs applies movement and special rules, while the model types represent players, pieces and board spaces. The excerpts show the main gameplay relationships and board-cell operations. Other rule branches may exist in unsampled portions of Tablero.cs; no separate persistence or external service is evident.

Main entry points: [`Partida.cs`](https://github.com/gabrielmartinezcorrea06-pixel/parchis/blob/main/Partida.cs) (Game loop and console UI), [`Tablero.cs`](https://github.com/gabrielmartinezcorrea06-pixel/parchis/blob/main/Tablero.cs) (Board and movement rules), [`Ficha.cs`](https://github.com/gabrielmartinezcorrea06-pixel/parchis/blob/main/Ficha.cs) (Piece state), [`Jugador.cs`](https://github.com/gabrielmartinezcorrea06-pixel/parchis/blob/main/Jugador.cs) (Player state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_play["Game flow"]
  node_game["Game loop and console UI<br/>[Partida.cs]"]
  node_dice["Dice roll<br/>[Dado.cs]"]
end

subgraph group_rules["Board rules"]
  node_board["Board and movement rules<br/>[Tablero.cs]"]
  node_spaces["Board spaces<br/>[Casilla.cs]"]
end

subgraph group_model["Game model"]
  node_player["Player state<br/>[Jugador.cs]"]
  node_piece["Piece state<br/>[Ficha.cs]"]
  node_piece_status["Piece statuses<br/>[EstadoFicha.cs]"]
  node_space_type["Space types<br/>[TipoCasilla.cs]"]
end

node_user(("Player"))

node_user -->|"chooses and moves"| node_game
node_game -->|"creates players"| node_player
node_game -->|"creates and moves"| node_board
node_game -.->|"rolls"| node_dice
node_game -->|"reads turn state"| node_player
node_game -->|"checks status"| node_piece_status
node_board -->|"reads and updates"| node_spaces
node_board -->|"updates movement"| node_piece
node_board -->|"checks and sets"| node_piece_status
node_board -->|"checks type"| node_space_type
node_spaces -->|"stores and inspects"| node_piece
node_player -->|"creates four"| node_piece
node_piece -->|"stores status"| node_piece_status

click node_game "https://github.com/gabrielmartinezcorrea06-pixel/parchis/blob/main/Partida.cs"
click node_dice "https://github.com/gabrielmartinezcorrea06-pixel/parchis/blob/main/Dado.cs"
click node_board "https://github.com/gabrielmartinezcorrea06-pixel/parchis/blob/main/Tablero.cs"
click node_spaces "https://github.com/gabrielmartinezcorrea06-pixel/parchis/blob/main/Casilla.cs"
click node_player "https://github.com/gabrielmartinezcorrea06-pixel/parchis/blob/main/Jugador.cs"
click node_piece "https://github.com/gabrielmartinezcorrea06-pixel/parchis/blob/main/Ficha.cs"
click node_piece_status "https://github.com/gabrielmartinezcorrea06-pixel/parchis/blob/main/EstadoFicha.cs"
click node_space_type "https://github.com/gabrielmartinezcorrea06-pixel/parchis/blob/main/TipoCasilla.cs"

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_game,node_dice toneBlue
class node_board,node_spaces toneAmber
class node_player,node_piece,node_piece_status,node_space_type toneMint
class node_user toneIndigo
```

## Components

### Game flow

- [Game loop and console UI](https://github.com/gabrielmartinezcorrea06-pixel/parchis/blob/main/Partida.cs): `Partida.cs`
- [Dice roll](https://github.com/gabrielmartinezcorrea06-pixel/parchis/blob/main/Dado.cs): `Dado.cs`

### Board rules

- [Board and movement rules](https://github.com/gabrielmartinezcorrea06-pixel/parchis/blob/main/Tablero.cs): `Tablero.cs`
- [Board spaces](https://github.com/gabrielmartinezcorrea06-pixel/parchis/blob/main/Casilla.cs): `Casilla.cs`

### Game model

- [Player state](https://github.com/gabrielmartinezcorrea06-pixel/parchis/blob/main/Jugador.cs): `Jugador.cs`
- [Piece state](https://github.com/gabrielmartinezcorrea06-pixel/parchis/blob/main/Ficha.cs): `Ficha.cs`
- [Piece statuses](https://github.com/gabrielmartinezcorrea06-pixel/parchis/blob/main/EstadoFicha.cs): `EstadoFicha.cs`
- [Space types](https://github.com/gabrielmartinezcorrea06-pixel/parchis/blob/main/TipoCasilla.cs): `TipoCasilla.cs`

### Other components

- **Player**

## Connections

- Player → Game loop and console UI: chooses and moves (evidence: `Partida.cs`)
- Game loop and console UI → Player state: creates players (evidence: `Partida.cs`)
- Game loop and console UI → Board and movement rules: creates and moves (evidence: `Partida.cs`)
- Game loop and console UI → Dice roll: rolls (evidence: `Partida.cs`)
- Game loop and console UI → Player state: reads turn state (evidence: `Partida.cs`)
- Game loop and console UI → Piece statuses: checks status (evidence: `Partida.cs`)
- Board and movement rules → Board spaces: reads and updates (evidence: `Tablero.cs`)
- Board and movement rules → Piece state: updates movement (evidence: `Tablero.cs`)
- Board and movement rules → Piece statuses: checks and sets (evidence: `Tablero.cs`)
- Board and movement rules → Space types: checks type (evidence: `Tablero.cs`)
- Board spaces → Piece state: stores and inspects (evidence: `Casilla.cs`)
- Player state → Piece state: creates four (evidence: `Jugador.cs`)
- Piece state → Piece statuses: stores status (evidence: `Ficha.cs`)
