# harry-1391453181620-developer-group/jungle architecture

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

- Interactive diagram: https://gitdiagram.com/harry-1391453181620-developer-group/jungle
- Repository: https://github.com/harry-1391453181620-developer-group/jungle

## Overview

Jungle is a Swing arcade game: the player starts a run, moves and jumps to avoid ground bananas and monkey-thrown projectiles, accumulates score while protecting hearts, and reaches a game-over screen with restart and a persisted high score. The graph follows the sampled startup, panel, entity, and resource-loading calls. It also shows the collision, rendering, and score-storage responsibilities in the game panel; no README capabilities are available, and the listed resources do not include all image paths referenced by constants.

Main entry points: [`jungle/src/GamePanel.java`](https://github.com/harry-1391453181620-developer-group/jungle/blob/main/jungle/src/GamePanel.java) (Game loop and UI), [`jungle/src/util/ResourceLoader.java`](https://github.com/harry-1391453181620-developer-group/jungle/blob/main/jungle/src/util/ResourceLoader.java) (Resource loader), [`jungle/src/constants/GameConstants.java`](https://github.com/harry-1391453181620-developer-group/jungle/blob/main/jungle/src/constants/GameConstants.java) (Game settings), [`jungle/src/entity/Player.java`](https://github.com/harry-1391453181620-developer-group/jungle/blob/main/jungle/src/entity/Player.java) (Player character)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_main["Startup<br/>[Main.java]"]
  node_frame["Game window<br/>[GameFrame.java]"]
end

subgraph group_game["Game runtime"]
  node_panel["Game loop and UI<br/>[GamePanel.java]"]
  node_collision["Collision and scoring<br/>[GamePanel.java]"]
  node_score[("High-score file<br/>[highest_score.txt]")]
end

subgraph group_entities["Game entities"]
  node_actor["Player character<br/>[Player.java]"]
  node_banana["Ground banana<br/>[Banana.java]"]
  node_monkey["Monkey<br/>[Monkey.java]"]
  node_projectile["Thrown banana<br/>[MonkeyBanana.java]"]
end

subgraph group_support["Runtime support"]
  node_constants["Game settings<br/>[GameConstants.java]"]
  node_resources["Resource loader"]
  node_files["Local assets"]
end

node_player(("Player"))

node_player -->|"launches"| node_main
node_main -->|"creates"| node_frame
node_frame -->|"creates"| node_panel
node_frame -->|"starts run"| node_panel
node_panel -->|"creates"| node_actor
node_panel -->|"creates"| node_banana
node_panel -->|"creates"| node_monkey
node_panel -->|"fires"| node_projectile
node_panel -->|"updates"| node_actor
node_panel -->|"updates"| node_banana
node_panel -->|"updates"| node_monkey
node_panel -->|"updates"| node_projectile
node_panel -->|"checks hits"| node_collision
node_collision -->|"changes hearts"| node_actor
node_collision -->|"marks hit"| node_banana
node_collision -->|"marks hit"| node_projectile
node_panel -->|"reads and writes"| node_score
node_panel -->|"loads assets"| node_resources
node_actor -->|"loads image"| node_resources
node_banana -->|"loads image"| node_resources
node_monkey -->|"loads image"| node_resources
node_projectile -->|"loads image"| node_resources
node_resources -.->|"opens assets"| node_files
node_panel -->|"uses settings"| node_constants
node_frame -->|"uses dimensions"| node_constants
node_actor -->|"uses settings"| node_constants
node_banana -->|"uses settings"| node_constants
node_monkey -->|"uses settings"| node_constants
node_projectile -->|"uses settings"| node_constants

click node_main "https://github.com/harry-1391453181620-developer-group/jungle/blob/main/jungle/src/Main.java"
click node_frame "https://github.com/harry-1391453181620-developer-group/jungle/blob/main/jungle/src/GameFrame.java"
click node_panel "https://github.com/harry-1391453181620-developer-group/jungle/blob/main/jungle/src/GamePanel.java"
click node_collision "https://github.com/harry-1391453181620-developer-group/jungle/blob/main/jungle/src/GamePanel.java"
click node_score "https://github.com/harry-1391453181620-developer-group/jungle/blob/main/highest_score.txt"
click node_constants "https://github.com/harry-1391453181620-developer-group/jungle/blob/main/jungle/src/constants/GameConstants.java"
click node_actor "https://github.com/harry-1391453181620-developer-group/jungle/blob/main/jungle/src/entity/Player.java"
click node_banana "https://github.com/harry-1391453181620-developer-group/jungle/blob/main/jungle/src/entity/Banana.java"
click node_monkey "https://github.com/harry-1391453181620-developer-group/jungle/blob/main/jungle/src/entity/Monkey.java"
click node_projectile "https://github.com/harry-1391453181620-developer-group/jungle/blob/main/jungle/src/entity/MonkeyBanana.java"
click node_resources "https://github.com/harry-1391453181620-developer-group/jungle/blob/main/jungle/src/util/ResourceLoader.java"
click node_files "https://github.com/harry-1391453181620-developer-group/jungle/tree/main/jungle/resources"

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_main,node_frame toneBlue
class node_panel,node_collision,node_score toneAmber
class node_actor,node_banana,node_monkey,node_projectile toneMint
class node_constants,node_resources,node_files toneRose
class node_player toneIndigo
```

## Components

### Application shell

- [Startup](https://github.com/harry-1391453181620-developer-group/jungle/blob/main/jungle/src/Main.java): `jungle/src/Main.java`
- [Game window](https://github.com/harry-1391453181620-developer-group/jungle/blob/main/jungle/src/GameFrame.java): `jungle/src/GameFrame.java`

### Game runtime

- [Game loop and UI](https://github.com/harry-1391453181620-developer-group/jungle/blob/main/jungle/src/GamePanel.java): `jungle/src/GamePanel.java`
- [Collision and scoring](https://github.com/harry-1391453181620-developer-group/jungle/blob/main/jungle/src/GamePanel.java): `jungle/src/GamePanel.java`
- [High-score file](https://github.com/harry-1391453181620-developer-group/jungle/blob/main/highest_score.txt): `highest_score.txt`

### Game entities

- [Player character](https://github.com/harry-1391453181620-developer-group/jungle/blob/main/jungle/src/entity/Player.java): `jungle/src/entity/Player.java`
- [Ground banana](https://github.com/harry-1391453181620-developer-group/jungle/blob/main/jungle/src/entity/Banana.java): `jungle/src/entity/Banana.java`
- [Monkey](https://github.com/harry-1391453181620-developer-group/jungle/blob/main/jungle/src/entity/Monkey.java): `jungle/src/entity/Monkey.java`
- [Thrown banana](https://github.com/harry-1391453181620-developer-group/jungle/blob/main/jungle/src/entity/MonkeyBanana.java): `jungle/src/entity/MonkeyBanana.java`

### Runtime support

- [Game settings](https://github.com/harry-1391453181620-developer-group/jungle/blob/main/jungle/src/constants/GameConstants.java): `jungle/src/constants/GameConstants.java`
- [Resource loader](https://github.com/harry-1391453181620-developer-group/jungle/blob/main/jungle/src/util/ResourceLoader.java): `jungle/src/util/ResourceLoader.java`
- [Local assets](https://github.com/harry-1391453181620-developer-group/jungle/tree/main/jungle/resources): `jungle/resources`

### Other components

- **Player**

## Connections

- Player → Startup: launches (evidence: `jungle/src/Main.java`)
- Startup → Game window: creates (evidence: `jungle/src/Main.java`)
- Game window → Game loop and UI: creates (evidence: `jungle/src/GameFrame.java`)
- Game window → Game loop and UI: starts run (evidence: `jungle/src/GameFrame.java`)
- Game loop and UI → Player character: creates (evidence: `jungle/src/GamePanel.java`)
- Game loop and UI → Ground banana: creates (evidence: `jungle/src/GamePanel.java`)
- Game loop and UI → Monkey: creates (evidence: `jungle/src/GamePanel.java`)
- Game loop and UI → Thrown banana: fires (evidence: `jungle/src/GamePanel.java`)
- Game loop and UI → Player character: updates (evidence: `jungle/src/GamePanel.java`)
- Game loop and UI → Ground banana: updates (evidence: `jungle/src/GamePanel.java`)
- Game loop and UI → Monkey: updates (evidence: `jungle/src/GamePanel.java`)
- Game loop and UI → Thrown banana: updates (evidence: `jungle/src/GamePanel.java`)
- Game loop and UI → Collision and scoring: checks hits (evidence: `jungle/src/GamePanel.java`)
- Collision and scoring → Player character: changes hearts (evidence: `jungle/src/GamePanel.java`)
- Collision and scoring → Ground banana: marks hit (evidence: `jungle/src/GamePanel.java`)
- Collision and scoring → Thrown banana: marks hit (evidence: `jungle/src/GamePanel.java`)
- Game loop and UI → High-score file: reads and writes (evidence: `jungle/src/GamePanel.java`)
- Game loop and UI → Resource loader: loads assets (evidence: `jungle/src/GamePanel.java`)
- Player character → Resource loader: loads image (evidence: `jungle/src/entity/Player.java`)
- Ground banana → Resource loader: loads image (evidence: `jungle/src/entity/Banana.java`)
- Monkey → Resource loader: loads image (evidence: `jungle/src/entity/Monkey.java`)
- Thrown banana → Resource loader: loads image (evidence: `jungle/src/entity/MonkeyBanana.java`)
- Resource loader → Local assets: opens assets
- Game loop and UI → Game settings: uses settings (evidence: `jungle/src/GamePanel.java`)
- Game window → Game settings: uses dimensions (evidence: `jungle/src/GameFrame.java`)
- Player character → Game settings: uses settings (evidence: `jungle/src/entity/Player.java`)
- Ground banana → Game settings: uses settings (evidence: `jungle/src/entity/Banana.java`)
- Monkey → Game settings: uses settings (evidence: `jungle/src/entity/Monkey.java`)
- Thrown banana → Game settings: uses settings (evidence: `jungle/src/entity/MonkeyBanana.java`)
