# marambfa/acl-isn-2025-bug_busters architecture

> Architecture diagram of the GitHub repository marambfa/acl-isn-2025-bug_busters, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-11-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/marambfa/acl-isn-2025-bug_busters
- Repository: https://github.com/marambfa/acl-isn-2025-bug_busters

## Overview

##### Project type and purpose
- This is a standalone, desktop Java game (“Jeu de Labyrinthe”) built with Maven.
- It comprises a small game engine, a Swing/JavaFX (or AWT) based UI, and a set of domain‐model entities representing heroes, monsters, keys, treasures, etc.

##### File structure
- Top level:
- pom.xml – Maven build descriptor
- src/main/java – production code
◦ com/example/App.java – generic entrypoint stub/test
◦ main – game launcher, window, engine classes
◦ entity – domain model (Heros, Monstre, Weapon, etc.)
◦ simple – utility/value classes (Position, Difficulty)
- src/main/resources/images – static assets
- src/test/java – unit tests
- No microservices or external servers—everything runs in one JVM process.
- No external dependencies beyond JDK17 and possibly a GUI toolkit.

##### README
- Build: mvn clean compile
- Run: mvn exec:java
- Target environment: Java 17, Eclipse IDE

##### Main components
a. Game Launcher
– Main.java initializes the application.
b. Game Engine / Core Loop
– Labyrinthe.java orchestrates tile setup, entity placement, game ticks.
c. UI Layer
– FenetreLabyrinthe.java renders the maze, sprites, handles user input.
d. Domain Model
– Entities: Heros, Monstre, Ghost, Zombie, Cle, Tresor, Weapon (+ WeaponType, PointsDeVie).
e. Utilities
– simple.Position, simple.Difficulty for grid coordinates and difficulty settings.
f. Resources
– images folder providing sprite assets.
g. Build & Execution
– Maven plugin → compiler → exec:java

##### Relationships & interactions
- Main → invokes Game Engine’s initialization
- Game Engine ↔ Domain Model (creates and updates entity states)
- Game Engine → UI Layer (pushes updated state each tick)
- UI Layer → User Input → Game Engine (commands to move, pick up keys)
- Both Game Engine & UI  → read from resources/images
- Maven → compiles code + packages resources → exec plugin runs Main

##### Architectural patterns & principles
- Clear separation of concerns:
- Launcher (startup)
- Engine (game logic loop)
- Domain (state containers)
- UI (view & controller)
- Utilities (shared value types)
- MVC‐like flow: Model (entities) → View (FenetreLabyrinthe) ← Controller (keyboard handlers inside UI or Engine)
- Resource isolation: image assets separate from code

##### Essential elements
- Clear component names
- Build & run flow via Maven

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Build & Run
    subgraph "Build & Run"
        POM["pom.xml"]:::build
        Compiler["Java Compiler"]:::build
        Exec["exec:java Plugin"]:::build
        POM --> Compiler --> Exec --> Main
    end

    %% Source Code
    subgraph "Source Code (src/main/java)"
        subgraph "Launcher"
            Main["Main.java (Launcher)"]:::engine
            App["App.java"]:::engine
        end
        subgraph "Core Engine"
            Lab["Labyrinthe.java (Engine)"]:::engine
        end
        subgraph "UI Layer"
            UI["FenetreLabyrinthe.java (UI)"]:::ui
        end
        subgraph "Domain Model"
            Heros["Heros.java"]:::domain
            Monstre["Monstre.java"]:::domain
            Ghost["Ghost.java"]:::domain
            Zombie["Zombie.java"]:::domain
            Cle["Cle.java"]:::domain
            Tresor["Tresor.java"]:::domain
            Weapon["Weapon.java"]:::domain
            WeaponType["WeaponType.java"]:::domain
            PointsDeVie["PointsDeVie.java"]:::domain
        end
        subgraph "Utilities"
            Position["Position.java"]:::util
            Difficulty["Difficulty.java"]:::util
        end
    end

    %% Resources
    subgraph "Resources (src/main/resources)"
        Images["images"]:::resources
    end

    %% Tests
    subgraph "Tests (src/test/java)"
        AppTest["AppTest.java"]:::test
    end

    %% Interactions
    Exec -->|"runs"| Main
    Main -->|"init()"| Lab
    Lab -->|"create/update()"| Heros
    Lab -->|"create/update()"| Monstre
    Lab -->|"create/update()"| Ghost
    Lab -->|"create/update()"| Zombie
    Lab -->|"create/update()"| Cle
    Lab -->|"create/update()"| Tresor
    Lab -->|"create/update()"| Weapon
    Lab -->|"create/update()"| WeaponType
    Lab -->|"create/update()"| PointsDeVie
    Lab -->|"render(state)"| UI
    UI -->|"handle(input)"| Lab
    Lab -.->|"loadImage()"| Images
    UI -.->|"loadImage()"| Images

    %% Click Events
    click Main "https://github.com/marambfa/acl-isn-2025-bug_busters/blob/main/ACL-ISN-2025-Bug_Busters/src/main/java/main/Main.java"
    click Lab "https://github.com/marambfa/acl-isn-2025-bug_busters/blob/main/ACL-ISN-2025-Bug_Busters/src/main/java/main/Labyrinthe.java"
    click UI "https://github.com/marambfa/acl-isn-2025-bug_busters/blob/main/ACL-ISN-2025-Bug_Busters/src/main/java/main/FenetreLabyrinthe.java"
    click App "https://github.com/marambfa/acl-isn-2025-bug_busters/blob/main/ACL-ISN-2025-Bug_Busters/src/main/java/com/example/App.java"
    click Heros "https://github.com/marambfa/acl-isn-2025-bug_busters/blob/main/ACL-ISN-2025-Bug_Busters/src/main/java/entity/Heros.java"
    click Monstre "https://github.com/marambfa/acl-isn-2025-bug_busters/blob/main/ACL-ISN-2025-Bug_Busters/src/main/java/entity/Monstre.java"
    click Ghost "https://github.com/marambfa/acl-isn-2025-bug_busters/blob/main/ACL-ISN-2025-Bug_Busters/src/main/java/entity/Ghost.java"
    click Zombie "https://github.com/marambfa/acl-isn-2025-bug_busters/blob/main/ACL-ISN-2025-Bug_Busters/src/main/java/entity/Zombie.java"
    click Cle "https://github.com/marambfa/acl-isn-2025-bug_busters/blob/main/ACL-ISN-2025-Bug_Busters/src/main/java/entity/Cle.java"
    click Tresor "https://github.com/marambfa/acl-isn-2025-bug_busters/blob/main/ACL-ISN-2025-Bug_Busters/src/main/java/entity/Tresor.java"
    click Weapon "https://github.com/marambfa/acl-isn-2025-bug_busters/blob/main/ACL-ISN-2025-Bug_Busters/src/main/java/entity/Weapon.java"
    click WeaponType "https://github.com/marambfa/acl-isn-2025-bug_busters/blob/main/ACL-ISN-2025-Bug_Busters/src/main/java/entity/WeaponType.java"
    click PointsDeVie "https://github.com/marambfa/acl-isn-2025-bug_busters/blob/main/ACL-ISN-2025-Bug_Busters/src/main/java/entity/PointsDeVie.java"
    click Position "https://github.com/marambfa/acl-isn-2025-bug_busters/blob/main/ACL-ISN-2025-Bug_Busters/src/main/java/simple/Position.java"
    click Difficulty "https://github.com/marambfa/acl-isn-2025-bug_busters/blob/main/ACL-ISN-2025-Bug_Busters/src/main/java/simple/Difficulty.java"
    click Images "https://github.com/marambfa/acl-isn-2025-bug_busters/tree/main/ACL-ISN-2025-Bug_Busters/src/main/resources/images"
    click POM "https://github.com/marambfa/acl-isn-2025-bug_busters/blob/main/ACL-ISN-2025-Bug_Busters/pom.xml"
    click AppTest "https://github.com/marambfa/acl-isn-2025-bug_busters/blob/main/ACL-ISN-2025-Bug_Busters/src/test/java/com/example/AppTest.java"

    %% Styles
    classDef engine fill:#add8e6,stroke:#000
    classDef domain fill:#90ee90,stroke:#000
    classDef ui fill:#ffa500,stroke:#000
    classDef util fill:#d3d3d3,stroke:#000
    classDef resources fill:#d3d3d3,stroke:#000
    classDef build fill:#333333,stroke:#000,color:#fff
    classDef test fill:#eeeeee,stroke:#000
```
