# pmassereyes/battlegame-master architecture

> Architecture diagram of the GitHub repository pmassereyes/battlegame-master, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pmassereyes/battlegame-master
- Repository: https://github.com/pmassereyes/battlegame-master

## Overview

Battle is a JavaFX fighting game. Its documented player journey is character/opponent selection, an active fight with attacks and health changes, then a result screen. The README says the screens share one FXML file and controller; the tree also contains a JavaFX application class, character class, and visual/audio assets. Source excerpts do not reveal runtime wiring, so uncertain connections are dashed and unverified rather than presented as observed calls.

Main entry points: [`src/main/java/test/battle/Controller.java`](https://github.com/pmassereyes/battlegame-master/blob/master/src/main/java/test/battle/Controller.java) (Game controller), [`src/main/resources/test/battle/hello-view.fxml`](https://github.com/pmassereyes/battlegame-master/blob/master/src/main/resources/test/battle/hello-view.fxml) (Active combat), [`src/main/java/test/battle/HelloApplication.java`](https://github.com/pmassereyes/battlegame-master/blob/master/src/main/java/test/battle/HelloApplication.java) (JavaFX application), [`src/main/java/test/battle/Danseur.java`](https://github.com/pmassereyes/battlegame-master/blob/master/src/main/java/test/battle/Danseur.java) (Characters)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Game runtime"]
  node_application["JavaFX application"]
  node_controller["Game controller<br/>[Controller.java]"]
  node_characters["Characters<br/>[Danseur.java]"]
end

subgraph group_interface["Game interface"]
  node_selection["Character selection<br/>[hello-view.fxml]"]
  node_combat["Active combat<br/>[hello-view.fxml]"]
  node_result["Combat result<br/>[hello-view.fxml]"]
end

subgraph group_assets["Game assets"]
  node_visuals["Battle visuals"]
  node_music["Battle music<br/>[poppingSong.wav]"]
end

node_player(("Player"))

node_player -.->|"starts game"| node_application
node_application -.->|"launches"| node_controller
node_controller -.->|"presents selection"| node_selection
node_selection -->|"chooses fighters"| node_combat
node_combat -->|"ends in result"| node_result
node_controller -.->|"manages fighters"| node_characters
node_controller -.->|"updates fight"| node_combat
node_controller -.->|"uses visuals"| node_visuals
node_controller -.->|"plays music"| node_music

click node_application "https://github.com/pmassereyes/battlegame-master/blob/master/src/main/java/test/battle/HelloApplication.java"
click node_controller "https://github.com/pmassereyes/battlegame-master/blob/master/src/main/java/test/battle/Controller.java"
click node_characters "https://github.com/pmassereyes/battlegame-master/blob/master/src/main/java/test/battle/Danseur.java"
click node_selection "https://github.com/pmassereyes/battlegame-master/blob/master/src/main/resources/test/battle/hello-view.fxml"
click node_combat "https://github.com/pmassereyes/battlegame-master/blob/master/src/main/resources/test/battle/hello-view.fxml"
click node_result "https://github.com/pmassereyes/battlegame-master/blob/master/src/main/resources/test/battle/hello-view.fxml"
click node_visuals "https://github.com/pmassereyes/battlegame-master/tree/master/src/main/resources/test/battle/gif%20battle"
click node_music "https://github.com/pmassereyes/battlegame-master/blob/master/src/main/resources/test/battle/audio/poppingSong.wav"

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_application,node_controller,node_characters toneBlue
class node_selection,node_combat,node_result toneAmber
class node_visuals,node_music toneMint
class node_player toneIndigo
```

## Components

### Game runtime

- [JavaFX application](https://github.com/pmassereyes/battlegame-master/blob/master/src/main/java/test/battle/HelloApplication.java): `src/main/java/test/battle/HelloApplication.java`
- [Game controller](https://github.com/pmassereyes/battlegame-master/blob/master/src/main/java/test/battle/Controller.java): `src/main/java/test/battle/Controller.java`
- [Characters](https://github.com/pmassereyes/battlegame-master/blob/master/src/main/java/test/battle/Danseur.java): `src/main/java/test/battle/Danseur.java`

### Game interface

- [Character selection](https://github.com/pmassereyes/battlegame-master/blob/master/src/main/resources/test/battle/hello-view.fxml): `src/main/resources/test/battle/hello-view.fxml`
- [Active combat](https://github.com/pmassereyes/battlegame-master/blob/master/src/main/resources/test/battle/hello-view.fxml): `src/main/resources/test/battle/hello-view.fxml`
- [Combat result](https://github.com/pmassereyes/battlegame-master/blob/master/src/main/resources/test/battle/hello-view.fxml): `src/main/resources/test/battle/hello-view.fxml`

### Game assets

- [Battle visuals](https://github.com/pmassereyes/battlegame-master/tree/master/src/main/resources/test/battle/gif%20battle): `src/main/resources/test/battle/gif battle`
- [Battle music](https://github.com/pmassereyes/battlegame-master/blob/master/src/main/resources/test/battle/audio/poppingSong.wav): `src/main/resources/test/battle/audio/poppingSong.wav`

### Other components

- **Player**

## Connections

- Player → JavaFX application: starts game
- JavaFX application → Game controller: launches
- Game controller → Character selection: presents selection
- Character selection → Active combat: chooses fighters (evidence: `README.md`)
- Active combat → Combat result: ends in result (evidence: `README.md`)
- Game controller → Characters: manages fighters
- Game controller → Active combat: updates fight
- Game controller → Battle visuals: uses visuals
- Game controller → Battle music: plays music
