# moblenon/jeu-d-abeilles-bzzz-python-tkinter-tkiteasy architecture

> Architecture diagram of the GitHub repository moblenon/jeu-d-abeilles-bzzz-python-tkinter-tkiteasy, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/moblenon/jeu-d-abeilles-bzzz-python-tkinter-tkiteasy
- Repository: https://github.com/moblenon/jeu-d-abeilles-bzzz-python-tkinter-tkiteasy

## Overview

BZZZ is a Python/Tkinter turn-based bee strategy game. The workflow starts in `main.py`, which creates players and a flower-filled board, opens and renders the game window, then hands play to the human or AI game loop. Each turn handles bee actions and resource changes before resolving automatic skirmishes; the game then displays ranked results. The graph separates setup, orchestration, rules and presentation. Some capabilities are documented in the README but their implementation is unsampled, so only supported relationships are shown.

Main entry points: [`tour_jeu.py`](https://github.com/moblenon/jeu-d-abeilles-bzzz-python-tkinter-tkiteasy/blob/main/tour_jeu.py) (Human turn), [`main.py`](https://github.com/moblenon/jeu-d-abeilles-bzzz-python-tkinter-tkiteasy/blob/main/main.py) (Game entry), [`prog_M.py`](https://github.com/moblenon/jeu-d-abeilles-bzzz-python-tkinter-tkiteasy/blob/main/prog_M.py) (Bee and nectar rules), [`mode_jeu.py`](https://github.com/moblenon/jeu-d-abeilles-bzzz-python-tkinter-tkiteasy/blob/main/mode_jeu.py) (Game modes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_flow["Game flow"]
  node_entry["Game entry<br/>[main.py]"]
  node_game_modes["Game modes<br/>[mode_jeu.py]"]
  node_human_turn["Human turn<br/>[tour_jeu.py]"]
  node_ai_turn["AI turn<br/>[mode_jeu.py]"]
end

subgraph group_rules["Game rules"]
  node_board_setup["Board setup<br/>[prog_M.py]"]
  node_game_rules["Bee and nectar rules<br/>[prog_M.py]"]
  node_combat["Skirmish resolution<br/>[escarmouche.py]"]
  node_game_state["Game state<br/>[constantes.py]"]
end

subgraph group_presentation["Presentation"]
  node_board_view["Board display<br/>[affichage.py]"]
  node_turn_controls["Turn controls<br/>[tour_jeu.py]"]
  node_result_view["Results podium<br/>[affichage.py]"]
end

subgraph group_platform["UI platform"]
  node_canvas["Tk canvas<br/>[tkiteasy.py]"]
end

node_player(("Player"))

node_player -->|"starts game"| node_entry
node_entry -->|"creates board"| node_board_setup
node_entry -->|"reads settings"| node_game_state
node_entry -->|"renders board"| node_board_view
node_entry -->|"starts mode"| node_game_modes
node_game_modes -->|"checks end"| node_game_rules
node_game_modes -->|"runs human turns"| node_human_turn
node_game_modes -->|"runs AI turns"| node_ai_turn
node_ai_turn -->|"chooses actions"| node_game_rules
node_ai_turn -->|"moves bee"| node_board_view
node_player -->|"clicks actions"| node_human_turn
node_human_turn -->|"validates actions"| node_game_rules
node_human_turn -->|"updates display"| node_board_view
node_human_turn -->|"resolves skirmish"| node_combat
node_human_turn -->|"deposits nectar"| node_game_rules
node_human_turn -->|"reads clicks"| node_turn_controls
node_board_setup -->|"creates entities"| node_game_state
node_game_rules -->|"updates entities"| node_game_state
node_combat -->|"updates bee status"| node_game_state
node_entry -->|"shows results"| node_result_view
node_board_view -->|"draws board"| node_canvas
node_turn_controls -->|"waits for clicks"| node_canvas
node_result_view -->|"draws podium"| node_canvas

click node_entry "https://github.com/moblenon/jeu-d-abeilles-bzzz-python-tkinter-tkiteasy/blob/main/main.py"
click node_game_modes "https://github.com/moblenon/jeu-d-abeilles-bzzz-python-tkinter-tkiteasy/blob/main/mode_jeu.py"
click node_human_turn "https://github.com/moblenon/jeu-d-abeilles-bzzz-python-tkinter-tkiteasy/blob/main/tour_jeu.py"
click node_ai_turn "https://github.com/moblenon/jeu-d-abeilles-bzzz-python-tkinter-tkiteasy/blob/main/mode_jeu.py"
click node_board_setup "https://github.com/moblenon/jeu-d-abeilles-bzzz-python-tkinter-tkiteasy/blob/main/prog_M.py"
click node_game_rules "https://github.com/moblenon/jeu-d-abeilles-bzzz-python-tkinter-tkiteasy/blob/main/prog_M.py"
click node_combat "https://github.com/moblenon/jeu-d-abeilles-bzzz-python-tkinter-tkiteasy/blob/main/escarmouche.py"
click node_game_state "https://github.com/moblenon/jeu-d-abeilles-bzzz-python-tkinter-tkiteasy/blob/main/constantes.py"
click node_board_view "https://github.com/moblenon/jeu-d-abeilles-bzzz-python-tkinter-tkiteasy/blob/main/affichage.py"
click node_turn_controls "https://github.com/moblenon/jeu-d-abeilles-bzzz-python-tkinter-tkiteasy/blob/main/tour_jeu.py"
click node_result_view "https://github.com/moblenon/jeu-d-abeilles-bzzz-python-tkinter-tkiteasy/blob/main/affichage.py"
click node_canvas "https://github.com/moblenon/jeu-d-abeilles-bzzz-python-tkinter-tkiteasy/blob/main/tkiteasy.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_entry,node_game_modes,node_human_turn,node_ai_turn toneBlue
class node_board_setup,node_game_rules,node_combat,node_game_state toneAmber
class node_board_view,node_turn_controls,node_result_view toneMint
class node_canvas toneRose
class node_player toneIndigo
```

## Components

### Game flow

- [Game entry](https://github.com/moblenon/jeu-d-abeilles-bzzz-python-tkinter-tkiteasy/blob/main/main.py): `main.py`
- [Game modes](https://github.com/moblenon/jeu-d-abeilles-bzzz-python-tkinter-tkiteasy/blob/main/mode_jeu.py): `mode_jeu.py`
- [Human turn](https://github.com/moblenon/jeu-d-abeilles-bzzz-python-tkinter-tkiteasy/blob/main/tour_jeu.py): `tour_jeu.py`
- [AI turn](https://github.com/moblenon/jeu-d-abeilles-bzzz-python-tkinter-tkiteasy/blob/main/mode_jeu.py): `mode_jeu.py`

### Game rules

- [Board setup](https://github.com/moblenon/jeu-d-abeilles-bzzz-python-tkinter-tkiteasy/blob/main/prog_M.py): `prog_M.py`
- [Bee and nectar rules](https://github.com/moblenon/jeu-d-abeilles-bzzz-python-tkinter-tkiteasy/blob/main/prog_M.py): `prog_M.py`
- [Skirmish resolution](https://github.com/moblenon/jeu-d-abeilles-bzzz-python-tkinter-tkiteasy/blob/main/escarmouche.py): `escarmouche.py`
- [Game state](https://github.com/moblenon/jeu-d-abeilles-bzzz-python-tkinter-tkiteasy/blob/main/constantes.py): `constantes.py`

### Presentation

- [Board display](https://github.com/moblenon/jeu-d-abeilles-bzzz-python-tkinter-tkiteasy/blob/main/affichage.py): `affichage.py`
- [Turn controls](https://github.com/moblenon/jeu-d-abeilles-bzzz-python-tkinter-tkiteasy/blob/main/tour_jeu.py): `tour_jeu.py`
- [Results podium](https://github.com/moblenon/jeu-d-abeilles-bzzz-python-tkinter-tkiteasy/blob/main/affichage.py): `affichage.py`

### UI platform

- [Tk canvas](https://github.com/moblenon/jeu-d-abeilles-bzzz-python-tkinter-tkiteasy/blob/main/tkiteasy.py): `tkiteasy.py`

### Other components

- **Player**

## Connections

- Player → Game entry: starts game (evidence: `README.md`)
- Game entry → Board setup: creates board (evidence: `main.py`)
- Game entry → Game state: reads settings (evidence: `main.py`)
- Game entry → Board display: renders board (evidence: `main.py`)
- Game entry → Game modes: starts mode (evidence: `main.py`)
- Game modes → Bee and nectar rules: checks end (evidence: `mode_jeu.py`)
- Game modes → Human turn: runs human turns (evidence: `mode_jeu.py`)
- Game modes → AI turn: runs AI turns (evidence: `mode_jeu.py`)
- AI turn → Bee and nectar rules: chooses actions (evidence: `mode_jeu.py`)
- AI turn → Board display: moves bee (evidence: `mode_jeu.py`)
- Player → Human turn: clicks actions (evidence: `README.md`)
- Human turn → Bee and nectar rules: validates actions (evidence: `tour_jeu.py`)
- Human turn → Board display: updates display (evidence: `tour_jeu.py`)
- Human turn → Skirmish resolution: resolves skirmish (evidence: `tour_jeu.py`)
- Human turn → Bee and nectar rules: deposits nectar (evidence: `tour_jeu.py`)
- Human turn → Turn controls: reads clicks (evidence: `tour_jeu.py`)
- Board setup → Game state: creates entities (evidence: `prog_M.py`)
- Bee and nectar rules → Game state: updates entities (evidence: `constantes.py`)
- Skirmish resolution → Game state: updates bee status (evidence: `escarmouche.py`)
- Game entry → Results podium: shows results (evidence: `main.py`)
- Board display → Tk canvas: draws board (evidence: `affichage.py`)
- Turn controls → Tk canvas: waits for clicks (evidence: `tour_jeu.py`)
- Results podium → Tk canvas: draws podium (evidence: `affichage.py`)
