# rgabriel26/backgammon-game-python-pyqt6 architecture

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

- Interactive diagram: https://gitdiagram.com/rgabriel26/backgammon-game-python-pyqt6
- Repository: https://github.com/rgabriel26/backgammon-game-python-pyqt6

## Overview

This is a PyQt6 backgammon game. A player starts the application, interacts with the game window, and the game logic manages play using board layouts, checker behavior, and an AI opponent; the UI also provides information and message windows. The README identifies turn rotation, move visualization, and first-player selection as unfinished. Relationships below follow the README and the SOURCE INDEX references; unsampled UI wiring is not inferred.

Main entry points: [`main.py`](https://github.com/rgabriel26/backgammon-game-python-pyqt6/blob/master/main.py) (Application entry), [`gameLogic.py`](https://github.com/rgabriel26/backgammon-game-python-pyqt6/blob/master/gameLogic.py) (Game controller), [`layouts.py`](https://github.com/rgabriel26/backgammon-game-python-pyqt6/blob/master/layouts.py) (Board layouts), [`messageWindow.py`](https://github.com/rgabriel26/backgammon-game-python-pyqt6/blob/master/messageWindow.py) (Message window)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Game interface"]
  node_app["Application entry<br/>[main.py]"]
  node_boxinfo["Box info window<br/>[boxInfoWindow.py]"]
  node_messages["Message window<br/>[messageWindow.py]"]
end

subgraph group_play["Game logic"]
  node_game["Game controller<br/>[gameLogic.py]"]
  node_layouts["Board layouts<br/>[layouts.py]"]
  node_checkers["Checker behavior<br/>[checkers.py]"]
end

subgraph group_opponent["AI opponent"]
  node_ai["AI logic<br/>[aiLogic.py]"]
end

node_player(("Player"))

node_player -->|"starts and plays"| node_app
node_app -->|"launches"| node_game
node_app -->|"imports"| node_boxinfo
node_app -->|"imports"| node_messages
node_game -->|"uses layouts"| node_layouts
node_game -->|"uses messages"| node_messages
node_game -->|"uses AI"| node_ai
node_layouts -->|"uses checker logic"| node_checkers

click node_app "https://github.com/rgabriel26/backgammon-game-python-pyqt6/blob/master/main.py"
click node_game "https://github.com/rgabriel26/backgammon-game-python-pyqt6/blob/master/gameLogic.py"
click node_layouts "https://github.com/rgabriel26/backgammon-game-python-pyqt6/blob/master/layouts.py"
click node_checkers "https://github.com/rgabriel26/backgammon-game-python-pyqt6/blob/master/checkers.py"
click node_ai "https://github.com/rgabriel26/backgammon-game-python-pyqt6/blob/master/aiLogic.py"
click node_boxinfo "https://github.com/rgabriel26/backgammon-game-python-pyqt6/blob/master/boxInfoWindow.py"
click node_messages "https://github.com/rgabriel26/backgammon-game-python-pyqt6/blob/master/messageWindow.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_boxinfo,node_messages toneBlue
class node_game,node_layouts,node_checkers toneAmber
class node_ai toneMint
class node_player toneIndigo
```

## Components

### Game interface

- [Application entry](https://github.com/rgabriel26/backgammon-game-python-pyqt6/blob/master/main.py): `main.py`
- [Box info window](https://github.com/rgabriel26/backgammon-game-python-pyqt6/blob/master/boxInfoWindow.py): `boxInfoWindow.py`
- [Message window](https://github.com/rgabriel26/backgammon-game-python-pyqt6/blob/master/messageWindow.py): `messageWindow.py`

### Game logic

- [Game controller](https://github.com/rgabriel26/backgammon-game-python-pyqt6/blob/master/gameLogic.py): `gameLogic.py`
- [Board layouts](https://github.com/rgabriel26/backgammon-game-python-pyqt6/blob/master/layouts.py): `layouts.py`
- [Checker behavior](https://github.com/rgabriel26/backgammon-game-python-pyqt6/blob/master/checkers.py): `checkers.py`

### AI opponent

- [AI logic](https://github.com/rgabriel26/backgammon-game-python-pyqt6/blob/master/aiLogic.py): `aiLogic.py`

### Other components

- **Player**

## Connections

- Player → Application entry: starts and plays
- Application entry → Game controller: launches (evidence: `main.py`)
- Application entry → Box info window: imports (evidence: `main.py`)
- Application entry → Message window: imports (evidence: `main.py`)
- Game controller → Board layouts: uses layouts (evidence: `gameLogic.py`)
- Game controller → Message window: uses messages (evidence: `gameLogic.py`)
- Game controller → AI logic: uses AI (evidence: `gameLogic.py`)
- Board layouts → Checker behavior: uses checker logic (evidence: `layouts.py`)
