# mathysethical/projetalgos3 architecture

> Architecture diagram of the GitHub repository mathysethical/projetalgos3, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mathysethical/projetalgos3
- Repository: https://github.com/mathysethical/projetalgos3

## Overview

##### Main Components Identification
The system consists of several key classes that interact with each other:
- Game (Jeu.cs)
- Board (Plateau.cs)
- Dictionary (Dictionnaire.cs)
- Player (Joueur.cs)
- Dice (Dice.cs)
- Tree (Tree.cs) - For optimized word searching

- Jeu (Game Controller)
- Plateau (Game Board)
- Dictionnaire (Word Validation)
- Joueur (Player Management)
- Dice (Game Pieces)
- Tree (Word Search Optimization)

- Jeu ←→ Plateau (Board state management)
- Jeu ←→ Joueur (Player interactions)
- Plateau ←→ Dice (Board generation)
- Dictionnaire ←→ Tree (Word validation)

- files/EN.txt (English dictionary)
- files/FR.txt (French dictionary)
- files/lettres.txt (Letter configuration)

##### Component Relationships

- □ Core Components
- ○ Data Stores
- → Method Calls
- ⇢ Data Flow
- ⚡ Critical Paths

##### Additional Notes
- Word validation flow as a critical path
- AI player integration points
- Clear separation between game logic and data storage
- Error handling paths for file operations

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Core
        Jeu["Game Controller"]:::core
        Plateau["Game Board"]:::core
        Joueur["Player Management"]:::player
        Dice["Dice Component"]:::core
    end

    subgraph "Data Structures"
        Tree["Word Search Tree"]:::data
        Dict["Dictionary Component"]:::data
    end

    subgraph "File System"
        EN[("EN.txt")]:::file
        FR[("FR.txt")]:::file
        Lettres[("lettres.txt")]:::file
    end

    subgraph "Testing Layer"
        DiceTest["Dice Tests"]:::test
        TreeTest["Tree Tests"]:::test
        ProgramTest["Program Tests"]:::test
    end

    %% Core Component Relationships
    Jeu <--> Plateau
    Jeu <--> Joueur
    Plateau <--> Dice
    Dict <--> Tree

    %% Data Flow
    Dict -.-> EN
    Dict -.-> FR
    Dice -.-> Lettres

    %% Test Relationships
    DiceTest --> Dice
    TreeTest --> Tree
    ProgramTest --> Jeu

    %% Click Events
    click Jeu "https://github.com/mathysEthical/ProjetAlgoS3/blob/main/Boggle/Jeu.cs"
    click Plateau "https://github.com/mathysEthical/ProjetAlgoS3/blob/main/Boggle/Plateau.cs"
    click Dict "https://github.com/mathysEthical/ProjetAlgoS3/blob/main/Boggle/Dictionnaire.cs"
    click Joueur "https://github.com/mathysEthical/ProjetAlgoS3/blob/main/Boggle/Joueur.cs"
    click Dice "https://github.com/mathysEthical/ProjetAlgoS3/blob/main/Boggle/Dice.cs"
    click Tree "https://github.com/mathysEthical/ProjetAlgoS3/blob/main/Boggle/Tree.cs"
    click EN "https://github.com/mathysEthical/ProjetAlgoS3/blob/main/Boggle/files/EN.txt"
    click FR "https://github.com/mathysEthical/ProjetAlgoS3/blob/main/Boggle/files/FR.txt"
    click Lettres "https://github.com/mathysEthical/ProjetAlgoS3/blob/main/Boggle/files/lettres.txt"
    click DiceTest "https://github.com/mathysEthical/ProjetAlgoS3/blob/main/UnitTestBoggle/diceTest.cs"
    click TreeTest "https://github.com/mathysEthical/ProjetAlgoS3/blob/main/UnitTestBoggle/treeTest.cs"
    click ProgramTest "https://github.com/mathysEthical/ProjetAlgoS3/blob/main/UnitTestBoggle/programTest.cs"

    %% Styles
    classDef core fill:#3498db,stroke:#2980b9,color:white
    classDef data fill:#2ecc71,stroke:#27ae60,color:white
    classDef player fill:#f1c40f,stroke:#f39c12,color:black
    classDef file fill:#95a5a6,stroke:#7f8c8d,color:white
    classDef test fill:#e74c3c,stroke:#c0392b,color:white

    %% Legend
    subgraph Legend
        L1["Core Components"]:::core
        L2["Data Structures"]:::data
        L3["Player Components"]:::player
        L4[("File System")]:::file
        L5["Test Components"]:::test
    end
```
