# matthieu777/utbm-ap4b-turing-machine architecture

> Architecture diagram of the GitHub repository matthieu777/utbm-ap4b-turing-machine, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/matthieu777/utbm-ap4b-turing-machine
- Repository: https://github.com/matthieu777/utbm-ap4b-turing-machine

## Overview

##### Project type and purpose
- The project implements an online version of the board game “Machine Turing” as part of a school project.
- It is primarily written in Java, with the main executable packaged as TuringMachine.jar and the source code located in the src/ directory.
- The README and file tree indicate that the project is a standalone game (not a typical full-stack web application) that includes both game logic and user interactions (via a graphical or console menu).

##### File structure
- Key directories and files:
- The src/ directory holds all Java source files. These include classes that represent the game’s domain (for example: Joueur, GroupeDeJoueur, Partie, RegleDuJeu, BaseDeCartes) and utility classes (TimerHorloge, Parametres).
- There is a set of “Problem” classes (Problem.java, Problem_4_cartes.java, Problem_5_cartes.java, Problem_6_cartes.java) likely used to generate or validate game scenarios based on card configurations.
- The src/images folder and src/texteproblem subdirectory indicate that the project includes static assets (images and text files) that are used as part of the game presentation.
- The bin/ directory holds compiled .class files, and the executable JAR (TuringMachine.jar) is provided at the project’s root.
- These organization choices suggest a separation between core game logic (model classes), game rules processing (problem-specific classes), user interface/Menu handling (MenuJeu.java), and support classes (Parametres, TimerHorloge, Verificateur).

##### README for additional insights
- The README explains how to run the game and describes it as an implementation of a board game.
- It emphasizes the project’s purpose as developing a game for an engineering course, so the core emphasis should be on game components, assets, and rule verification rather than, say, networked services or persistent databases.

## Diagram (Mermaid)

```mermaid
flowchart TD
    A["Main.java"]:::entry

    subgraph "Game Controller/Engine"
        B["MenuJeu.java"]:::engine
        C["Partie.java"]:::engine
        D["Parametres.java"]:::engine
        E["RegleDuJeu.java"]:::engine
        F["Verificateur.java"]:::engine
        G["TimerHorloge.java"]:::engine
    end

    subgraph "Domain/Model"
        H["Joueur.java"]:::domain
        I["GroupeDeJoueur.java"]:::domain
        J["BaseDeCartes.java"]:::domain
        K["CarteCritere.java"]:::domain
        L["Critere.java"]:::domain
    end

    subgraph "Problem Generation"
        M["Problem.java"]:::prob
        N["Problem_4_cartes.java"]:::prob
        O["Problem_5_cartes.java"]:::prob
        P["Problem_6_cartes.java"]:::prob
    end

    subgraph "Asset Management"
        Q["Images"]:::assets
        R["TextAssets"]:::assets
    end

    S["TuringMachine.jar"]:::packaging

    %% Relationships
    A -->|"launch"| B
    A -->|"initGame"| C
    B -->|"startGame"| C
    D -->|"configure"| C
    C -->|"validate"| E
    C -->|"verify"| F
    C -->|"timing"| G
    C -->|"managePlayers"| H
    C -->|"managePlayers"| I
    C -->|"handleCards"| J
    J -->|"defines"| K
    J -->|"defines"| L
    C -->|"selectProblem"| M
    M -->|"config4"| N
    M -->|"config5"| O
    M -->|"config6"| P
    B -->|"loadAssets"| Q
    B -->|"loadAssets"| R
    A -->|"packagedIn"| S

    %% Click Events
    click A "https://github.com/matthieu777/utbm-ap4b-turing-machine/blob/main/src/Main.java"
    click B "https://github.com/matthieu777/utbm-ap4b-turing-machine/blob/main/src/MenuJeu.java"
    click C "https://github.com/matthieu777/utbm-ap4b-turing-machine/blob/main/src/Partie.java"
    click D "https://github.com/matthieu777/utbm-ap4b-turing-machine/blob/main/src/Parametres.java"
    click E "https://github.com/matthieu777/utbm-ap4b-turing-machine/blob/main/src/RegleDuJeu.java"
    click F "https://github.com/matthieu777/utbm-ap4b-turing-machine/blob/main/src/Verificateur.java"
    click G "https://github.com/matthieu777/utbm-ap4b-turing-machine/blob/main/src/TimerHorloge.java"
    click H "https://github.com/matthieu777/utbm-ap4b-turing-machine/blob/main/src/Joueur.java"
    click I "https://github.com/matthieu777/utbm-ap4b-turing-machine/blob/main/src/GroupeDeJoueur.java"
    click J "https://github.com/matthieu777/utbm-ap4b-turing-machine/blob/main/src/BaseDeCartes.java"
    click K "https://github.com/matthieu777/utbm-ap4b-turing-machine/blob/main/src/CarteCritere.java"
    click L "https://github.com/matthieu777/utbm-ap4b-turing-machine/blob/main/src/Critere.java"
    click M "https://github.com/matthieu777/utbm-ap4b-turing-machine/blob/main/src/Problem.java"
    click N "https://github.com/matthieu777/utbm-ap4b-turing-machine/blob/main/src/Problem_4_cartes.java"
    click O "https://github.com/matthieu777/utbm-ap4b-turing-machine/blob/main/src/Problem_5_cartes.java"
    click P "https://github.com/matthieu777/utbm-ap4b-turing-machine/blob/main/src/Problem_6_cartes.java"
    click Q "https://github.com/matthieu777/utbm-ap4b-turing-machine/tree/main/src/images"
    click R "https://github.com/matthieu777/utbm-ap4b-turing-machine/tree/main/src/texteproblem"
    click S "https://github.com/matthieu777/utbm-ap4b-turing-machine/blob/main/TuringMachine.jar"

    %% Styles
    classDef entry fill:#ffcc5c,stroke:#000,stroke-width:2px;
    classDef engine fill:#a8d0e6,stroke:#000,stroke-width:2px;
    classDef domain fill:#f7d794,stroke:#000,stroke-width:2px;
    classDef prob fill:#d3adf7,stroke:#000,stroke-width:2px;
    classDef assets fill:#b8e994,stroke:#000,stroke-width:2px;
    classDef packaging fill:#ff6f69,stroke:#000,stroke-width:2px;
```
