# enes-sen/pongclone architecture

> Architecture diagram of the GitHub repository enes-sen/pongclone, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/enes-sen/pongclone
- Repository: https://github.com/enes-sen/pongclone

## Overview

This repository is a Unity 2D Pong game, with menu and gameplay scenes, player and enemy controllers, ball/goal mechanics, scoring, UI, and audio assets. The tree identifies these product areas but provides no README or source excerpts, so runtime wiring and the exact user-to-result flow cannot be verified; the graph therefore maps the main components without inventing call or data-flow edges.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gameplay["Gameplay"]
  node_player["Player Control"]
  node_enemy["Enemy AI<br/>[EnemyAi.cs]"]
  node_ball["Ball Physics<br/>[Ball.cs]"]
  node_goal["Goal Detection<br/>[GoalTrigger.cs]"]
  node_goal_contract["Goal Contract<br/>[IGoal.cs]"]
  node_game_controller["Game Control<br/>[GameController.cs]"]
end

subgraph group_experience["Game Experience"]
  node_score["Score Tracking<br/>[ScoreController.cs]"]
  node_ui["Game UI<br/>[UiController.cs]"]
  node_menu["Menu Controls<br/>[MenuControls.cs]"]
  node_audio["Audio Control"]
end

subgraph group_content["Scenes and Assets"]
  node_menu_scene["Menu Scene<br/>[Menu.unity]"]
  node_game_scene["Game Scene<br/>[Game.unity]"]
  node_prefabs["Gameplay Prefabs"]
  node_sound_assets["Sound Effects"]
end

node_player_actor(("Player"))

click node_player "https://github.com/enes-sen/pongclone/blob/main/Assets/_GameAssets/Scripts/Player/PlayerController.cs"
click node_enemy "https://github.com/enes-sen/pongclone/blob/main/Assets/_GameAssets/Scripts/Enemy/EnemyAi.cs"
click node_ball "https://github.com/enes-sen/pongclone/blob/main/Assets/_GameAssets/Scripts/Others/Ball.cs"
click node_goal "https://github.com/enes-sen/pongclone/blob/main/Assets/_GameAssets/Scripts/Others/GoalTrigger.cs"
click node_goal_contract "https://github.com/enes-sen/pongclone/blob/main/Assets/_GameAssets/Scripts/Interfaces/IGoal.cs"
click node_game_controller "https://github.com/enes-sen/pongclone/blob/main/Assets/_GameAssets/Scripts/Controllers/GameController.cs"
click node_score "https://github.com/enes-sen/pongclone/blob/main/Assets/_GameAssets/Scripts/Controllers/ScoreController.cs"
click node_ui "https://github.com/enes-sen/pongclone/blob/main/Assets/_GameAssets/Scripts/Controllers/UiController.cs"
click node_menu "https://github.com/enes-sen/pongclone/blob/main/Assets/_GameAssets/Scripts/Controllers/MenuControls.cs"
click node_audio "https://github.com/enes-sen/pongclone/blob/main/Assets/_GameAssets/Scripts/Controllers/AudioSController.cs"
click node_menu_scene "https://github.com/enes-sen/pongclone/blob/main/Assets/_GameAssets/Scenes/Menu.unity"
click node_game_scene "https://github.com/enes-sen/pongclone/blob/main/Assets/_GameAssets/Scenes/Game.unity"
click node_prefabs "https://github.com/enes-sen/pongclone/tree/main/Assets/_GameAssets/_Prefabs"
click node_sound_assets "https://github.com/enes-sen/pongclone/tree/main/Assets/_GameAssets/SFX"

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_player,node_enemy,node_ball,node_goal,node_goal_contract,node_game_controller toneBlue
class node_score,node_ui,node_menu,node_audio toneAmber
class node_menu_scene,node_game_scene,node_prefabs,node_sound_assets toneMint
class node_player_actor toneIndigo
```

## Components

### Gameplay

- [Player Control](https://github.com/enes-sen/pongclone/blob/main/Assets/_GameAssets/Scripts/Player/PlayerController.cs): `Assets/_GameAssets/Scripts/Player/PlayerController.cs`
- [Enemy AI](https://github.com/enes-sen/pongclone/blob/main/Assets/_GameAssets/Scripts/Enemy/EnemyAi.cs): `Assets/_GameAssets/Scripts/Enemy/EnemyAi.cs`
- [Ball Physics](https://github.com/enes-sen/pongclone/blob/main/Assets/_GameAssets/Scripts/Others/Ball.cs): `Assets/_GameAssets/Scripts/Others/Ball.cs`
- [Goal Detection](https://github.com/enes-sen/pongclone/blob/main/Assets/_GameAssets/Scripts/Others/GoalTrigger.cs): `Assets/_GameAssets/Scripts/Others/GoalTrigger.cs`
- [Goal Contract](https://github.com/enes-sen/pongclone/blob/main/Assets/_GameAssets/Scripts/Interfaces/IGoal.cs): `Assets/_GameAssets/Scripts/Interfaces/IGoal.cs`
- [Game Control](https://github.com/enes-sen/pongclone/blob/main/Assets/_GameAssets/Scripts/Controllers/GameController.cs): `Assets/_GameAssets/Scripts/Controllers/GameController.cs`

### Game Experience

- [Score Tracking](https://github.com/enes-sen/pongclone/blob/main/Assets/_GameAssets/Scripts/Controllers/ScoreController.cs): `Assets/_GameAssets/Scripts/Controllers/ScoreController.cs`
- [Game UI](https://github.com/enes-sen/pongclone/blob/main/Assets/_GameAssets/Scripts/Controllers/UiController.cs): `Assets/_GameAssets/Scripts/Controllers/UiController.cs`
- [Menu Controls](https://github.com/enes-sen/pongclone/blob/main/Assets/_GameAssets/Scripts/Controllers/MenuControls.cs): `Assets/_GameAssets/Scripts/Controllers/MenuControls.cs`
- [Audio Control](https://github.com/enes-sen/pongclone/blob/main/Assets/_GameAssets/Scripts/Controllers/AudioSController.cs): `Assets/_GameAssets/Scripts/Controllers/AudioSController.cs`

### Scenes and Assets

- [Menu Scene](https://github.com/enes-sen/pongclone/blob/main/Assets/_GameAssets/Scenes/Menu.unity): `Assets/_GameAssets/Scenes/Menu.unity`
- [Game Scene](https://github.com/enes-sen/pongclone/blob/main/Assets/_GameAssets/Scenes/Game.unity): `Assets/_GameAssets/Scenes/Game.unity`
- [Gameplay Prefabs](https://github.com/enes-sen/pongclone/tree/main/Assets/_GameAssets/_Prefabs): `Assets/_GameAssets/_Prefabs`
- [Sound Effects](https://github.com/enes-sen/pongclone/tree/main/Assets/_GameAssets/SFX): `Assets/_GameAssets/SFX`

### Other components

- **Player**
