# jayanthh71/monopoly architecture

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

- Interactive diagram: https://gitdiagram.com/jayanthh71/monopoly
- Repository: https://github.com/jayanthh71/monopoly

## Overview

This is a Tkinter Monopoly game with human and PC players, a board-game workflow, and optional MySQL save/load. The main implementation is a single large module, so interface, setup, turn handling, and game completion share its path. The README documents the supported play modes and persistence; excerpts show UI construction, turn dispatch, and SQL connection/update behavior, but do not expose the full rules or CSV-loading flow.

Main entry points: [`monopoly.py`](https://github.com/jayanthh71/monopoly/blob/main/monopoly.py) (Game interface), [`assets`](https://github.com/jayanthh71/monopoly/tree/main/assets) (Visual assets), [`fonts`](https://github.com/jayanthh71/monopoly/tree/main/fonts) (Fonts), [`properties.csv`](https://github.com/jayanthh71/monopoly/blob/main/properties.csv) (Property data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_play["Game experience"]
  node_game_ui["Game interface<br/>[monopoly.py]"]
  node_player_setup["Player setup<br/>[monopoly.py]"]
  node_turns["Turn handling<br/>[monopoly.py]"]
  node_board["Board play<br/>[monopoly.py]"]
  node_game_result["Game result<br/>[monopoly.py]"]
  node_pc_player["PC player<br/>[monopoly.py]"]
  node_visual_assets["Visual assets"]
  node_fonts["Fonts"]
end

subgraph group_rules["Game data"]
  node_property_data["Property data<br/>[properties.csv]"]
  node_property_cards["Property cards<br/>[propertycards.csv]"]
  node_chance_cards["Chance cards<br/>[cards.csv]"]
end

subgraph group_persistence["Save persistence"]
  node_save_load["Save and load<br/>[monopoly.py]"]
  node_mysql_driver["MySQL connector"]
  node_mysql_db[("MySQL database")]
end

node_player(("Player"))

node_player -->|"plays through"| node_game_ui
node_game_ui -->|"offers setup"| node_player_setup
node_player_setup -.->|"starts game"| node_turns
node_turns -->|"dispatches turn"| node_board
node_board -.->|"ends at"| node_game_result
node_pc_player -.->|"takes turns"| node_turns
node_game_ui -->|"supports PC play"| node_pc_player
node_board -.->|"uses properties"| node_property_data
node_board -.->|"uses cards"| node_property_cards
node_board -.->|"uses cards"| node_chance_cards
node_game_ui -->|"displays images"| node_visual_assets
node_game_ui -->|"loads fonts"| node_fonts
node_game_ui -->|"offers saves"| node_save_load
node_save_load -->|"connects through"| node_mysql_driver
node_mysql_driver -.->|"connects to"| node_mysql_db

click node_game_ui "https://github.com/jayanthh71/monopoly/blob/main/monopoly.py"
click node_player_setup "https://github.com/jayanthh71/monopoly/blob/main/monopoly.py"
click node_turns "https://github.com/jayanthh71/monopoly/blob/main/monopoly.py"
click node_board "https://github.com/jayanthh71/monopoly/blob/main/monopoly.py"
click node_game_result "https://github.com/jayanthh71/monopoly/blob/main/monopoly.py"
click node_pc_player "https://github.com/jayanthh71/monopoly/blob/main/monopoly.py"
click node_property_data "https://github.com/jayanthh71/monopoly/blob/main/properties.csv"
click node_property_cards "https://github.com/jayanthh71/monopoly/blob/main/propertycards.csv"
click node_chance_cards "https://github.com/jayanthh71/monopoly/blob/main/cards.csv"
click node_save_load "https://github.com/jayanthh71/monopoly/blob/main/monopoly.py"
click node_visual_assets "https://github.com/jayanthh71/monopoly/tree/main/assets"
click node_fonts "https://github.com/jayanthh71/monopoly/tree/main/fonts"

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_ui,node_player_setup,node_turns,node_board,node_game_result,node_pc_player,node_visual_assets,node_fonts toneBlue
class node_property_data,node_property_cards,node_chance_cards toneAmber
class node_save_load,node_mysql_driver,node_mysql_db toneMint
class node_player toneIndigo
```

## Components

### Game experience

- [Game interface](https://github.com/jayanthh71/monopoly/blob/main/monopoly.py): `monopoly.py`
- [Player setup](https://github.com/jayanthh71/monopoly/blob/main/monopoly.py): `monopoly.py`
- [Turn handling](https://github.com/jayanthh71/monopoly/blob/main/monopoly.py): `monopoly.py`
- [Board play](https://github.com/jayanthh71/monopoly/blob/main/monopoly.py): `monopoly.py`
- [Game result](https://github.com/jayanthh71/monopoly/blob/main/monopoly.py): `monopoly.py`
- [PC player](https://github.com/jayanthh71/monopoly/blob/main/monopoly.py): `monopoly.py`
- [Visual assets](https://github.com/jayanthh71/monopoly/tree/main/assets): `assets`
- [Fonts](https://github.com/jayanthh71/monopoly/tree/main/fonts): `fonts`

### Game data

- [Property data](https://github.com/jayanthh71/monopoly/blob/main/properties.csv): `properties.csv`
- [Property cards](https://github.com/jayanthh71/monopoly/blob/main/propertycards.csv): `propertycards.csv`
- [Chance cards](https://github.com/jayanthh71/monopoly/blob/main/cards.csv): `cards.csv`

### Save persistence

- [Save and load](https://github.com/jayanthh71/monopoly/blob/main/monopoly.py): `monopoly.py`
- **MySQL connector**
- **MySQL database**

### Other components

- **Player**

## Connections

- Player → Game interface: plays through (evidence: `README.md`)
- Game interface → Player setup: offers setup (evidence: `monopoly.py`)
- Player setup → Turn handling: starts game (evidence: `monopoly.py`)
- Turn handling → Board play: dispatches turn (evidence: `monopoly.py`)
- Board play → Game result: ends at (evidence: `monopoly.py`)
- PC player → Turn handling: takes turns (evidence: `monopoly.py`)
- Game interface → PC player: supports PC play (evidence: `README.md`)
- Board play → Property data: uses properties
- Board play → Property cards: uses cards
- Board play → Chance cards: uses cards
- Game interface → Visual assets: displays images (evidence: `monopoly.py`)
- Game interface → Fonts: loads fonts (evidence: `monopoly.py`)
- Game interface → Save and load: offers saves (evidence: `README.md`)
- Save and load → MySQL connector: connects through (evidence: `monopoly.py`)
- MySQL connector → MySQL database: connects to
