# sashabilenko9-glitch/football-heads-2026 architecture

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

- Interactive diagram: https://gitdiagram.com/sashabilenko9-glitch/football-heads-2026
- Repository: https://github.com/sashabilenko9-glitch/football-heads-2026

## Overview

Kopf-Fußball 2026 is a local two-player Swing football game. Players enter through the main menu, choose teams, then play a timed match using keyboard or on-screen controls; the game handles physics, goals, golden-goal overtime, and a goal-by-goal finish with rematch or menu options. The graph separates navigation, match orchestration, simulation entities, and presentation. README and sampled source support the main flow; several UI and window connections are documented but their implementation was not sampled.

Main entry points: [`src/main/java/com/footballheads/GamePanel.java`](https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/com/footballheads/GamePanel.java) (Match controller), [`src/main/java/ui/MenuPanel.java`](https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/ui/MenuPanel.java) (Main menu), [`src/main/java/ui/TeamSelectPanel.java`](https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/ui/TeamSelectPanel.java) (Team selection), [`src/main/java/entities/Ball.java`](https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/entities/Ball.java) (Ball physics)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["Navigation"]
  node_main["Application entry<br/>[Main.java]"]
  node_menu["Main menu<br/>[MenuPanel.java]"]
  node_controls["Controls screen<br/>[ControlsPanel.java]"]
  node_selection["Team selection"]
end

subgraph group_match["Match runtime"]
  node_frame["Game window<br/>[GameFrame.java]"]
  node_panel["Match controller<br/>[GamePanel.java]"]
  node_input["Input manager<br/>[InputManager.java]"]
end

subgraph group_simulation["Game simulation"]
  node_ball["Ball physics<br/>[Ball.java]"]
  node_players["Player physics<br/>[Player.java]"]
  node_stadium["Stadium<br/>[Stadium.java]"]
  node_goals["Goals<br/>[Goal.java]"]
  node_teams["Team data<br/>[Team.java]"]
  node_field["Field constants<br/>[Field.java]"]
end

subgraph group_presentation["Presentation"]
  node_touch["Touch controls"]
  node_hud["Match HUD<br/>[InGameUI.java]"]
  node_pause["Pause menu<br/>[PauseMenu.java]"]
  node_messages["Localized text<br/>[Messages.java]"]
  node_translations["Translation resources"]
end

node_player(("Local players"))

node_player -->|"launches"| node_main
node_main -->|"creates"| node_menu
node_menu -->|"opens"| node_controls
node_menu -->|"opens"| node_selection
node_selection -->|"starts match"| node_frame
node_frame -->|"hosts"| node_panel
node_panel -->|"reads input"| node_input
node_touch -->|"sets mobile input"| node_panel
node_panel -->|"updates"| node_ball
node_panel -->|"updates"| node_players
node_panel -->|"updates and draws"| node_stadium
node_ball -->|"checks collisions"| node_players
node_ball -->|"checks boundaries"| node_stadium
node_stadium -->|"owns"| node_goals
node_panel -->|"checks scoring"| node_goals
node_players -->|"uses physics constants"| node_field
node_ball -->|"uses physics constants"| node_field
node_selection -->|"selects"| node_teams
node_panel -.->|"updates match display"| node_hud
node_panel -.->|"opens"| node_pause
node_menu -->|"requests text"| node_messages
node_selection -->|"requests text"| node_messages
node_messages -.->|"loads strings"| node_translations

click node_main "https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/com/footballheads/Main.java"
click node_menu "https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/ui/MenuPanel.java"
click node_controls "https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/ui/ControlsPanel.java"
click node_selection "https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/ui/TeamSelectPanel.java"
click node_frame "https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/com/footballheads/GameFrame.java"
click node_panel "https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/com/footballheads/GamePanel.java"
click node_input "https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/com/footballheads/InputManager.java"
click node_touch "https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/ui/MobileControlsPanel.java"
click node_hud "https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/ui/InGameUI.java"
click node_pause "https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/ui/PauseMenu.java"
click node_ball "https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/entities/Ball.java"
click node_players "https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/entities/Player.java"
click node_stadium "https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/entities/Stadium.java"
click node_goals "https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/entities/Goal.java"
click node_teams "https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/entities/Team.java"
click node_field "https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/utils/Field.java"
click node_messages "https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/com/footballheads/Messages.java"
click node_translations "https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/resources/i18n/messages_en.properties"

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_menu,node_controls,node_selection toneBlue
class node_frame,node_panel,node_input toneAmber
class node_ball,node_players,node_stadium,node_goals,node_teams,node_field toneMint
class node_touch,node_hud,node_pause,node_messages,node_translations toneRose
class node_player toneIndigo
```

## Components

### Navigation

- [Application entry](https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/com/footballheads/Main.java): `src/main/java/com/footballheads/Main.java`
- [Main menu](https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/ui/MenuPanel.java): `src/main/java/ui/MenuPanel.java`
- [Controls screen](https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/ui/ControlsPanel.java): `src/main/java/ui/ControlsPanel.java`
- [Team selection](https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/ui/TeamSelectPanel.java): `src/main/java/ui/TeamSelectPanel.java`

### Match runtime

- [Game window](https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/com/footballheads/GameFrame.java): `src/main/java/com/footballheads/GameFrame.java`
- [Match controller](https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/com/footballheads/GamePanel.java): `src/main/java/com/footballheads/GamePanel.java`
- [Input manager](https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/com/footballheads/InputManager.java): `src/main/java/com/footballheads/InputManager.java`

### Game simulation

- [Ball physics](https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/entities/Ball.java): `src/main/java/entities/Ball.java`
- [Player physics](https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/entities/Player.java): `src/main/java/entities/Player.java`
- [Stadium](https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/entities/Stadium.java): `src/main/java/entities/Stadium.java`
- [Goals](https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/entities/Goal.java): `src/main/java/entities/Goal.java`
- [Team data](https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/entities/Team.java): `src/main/java/entities/Team.java`
- [Field constants](https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/utils/Field.java): `src/main/java/utils/Field.java`

### Presentation

- [Touch controls](https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/ui/MobileControlsPanel.java): `src/main/java/ui/MobileControlsPanel.java`
- [Match HUD](https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/ui/InGameUI.java): `src/main/java/ui/InGameUI.java`
- [Pause menu](https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/ui/PauseMenu.java): `src/main/java/ui/PauseMenu.java`
- [Localized text](https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/java/com/footballheads/Messages.java): `src/main/java/com/footballheads/Messages.java`
- [Translation resources](https://github.com/sashabilenko9-glitch/football-heads-2026/blob/main/src/main/resources/i18n/messages_en.properties): `src/main/resources/i18n/messages_en.properties`

### Other components

- **Local players**

## Connections

- Local players → Application entry: launches
- Application entry → Main menu: creates
- Main menu → Controls screen: opens
- Main menu → Team selection: opens
- Team selection → Game window: starts match
- Game window → Match controller: hosts
- Match controller → Input manager: reads input
- Touch controls → Match controller: sets mobile input
- Match controller → Ball physics: updates
- Match controller → Player physics: updates
- Match controller → Stadium: updates and draws
- Ball physics → Player physics: checks collisions
- Ball physics → Stadium: checks boundaries
- Stadium → Goals: owns
- Match controller → Goals: checks scoring
- Player physics → Field constants: uses physics constants
- Ball physics → Field constants: uses physics constants
- Team selection → Team data: selects
- Match controller → Match HUD: updates match display
- Match controller → Pause menu: opens
- Main menu → Localized text: requests text
- Team selection → Localized text: requests text
- Localized text → Translation resources: loads strings
