# maciopalis/smiecioban architecture

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

- Interactive diagram: https://gitdiagram.com/maciopalis/smiecioban
- Repository: https://github.com/maciopalis/smiecioban

## Overview

Śmiecioban is a Swing-based recycling puzzle game. Players choose one of 12 levels across three difficulty settings, move the character with WASD to sort waste into matching bins, and see a move count and recycling fact when the board is complete. The main runtime path runs from application startup through menus into game input, player movement, and board rules; rendering and music support play. Source excerpts show the core calls, but no README or excerpts document all level and asset details.

Main entry points: [`src/Game.java`](https://github.com/maciopalis/smiecioban/blob/main/src/Game.java) (Game controller), [`src/Menus.java`](https://github.com/maciopalis/smiecioban/blob/main/src/Menus.java) (Menus), [`src/GamePanel.java`](https://github.com/maciopalis/smiecioban/blob/main/src/GamePanel.java) (Game rendering), [`src/MusicManager.java`](https://github.com/maciopalis/smiecioban/blob/main/src/MusicManager.java) (Music manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Application UI"]
  node_main["Application start<br/>[Main.java]"]
  node_menus["Menus<br/>[Menus.java]"]
  node_panel["Game rendering<br/>[GamePanel.java]"]
end

subgraph group_play["Puzzle Runtime"]
  node_game["Game controller<br/>[Game.java]"]
  node_player_logic["Player movement<br/>[Player.java]"]
  node_board["Board rules<br/>[Board.java]"]
  node_levels["Level layouts<br/>[Levels.java]"]
end

subgraph group_resources["Game Resources"]
  node_music_manager["Music manager<br/>[MusicManager.java]"]
  node_graphics["Game graphics"]
  node_menu_graphics["Menu character art"]
  node_menu_music["Menu music<br/>[menu_music.wav]"]
  node_game_music["Game music<br/>[game_music.wav]"]
end

node_player(("Player"))

node_player -.->|"launches"| node_main
node_main -->|"creates"| node_menus
node_menus -->|"starts music"| node_music_manager
node_menus -->|"starts level"| node_game
node_menus -->|"loads art"| node_menu_graphics
node_menus -->|"stops music"| node_music_manager
node_game -->|"plays music"| node_music_manager
node_game -->|"creates board"| node_board
node_game -->|"creates player"| node_player_logic
node_game -->|"creates panel"| node_panel
node_game -->|"dispatches moves"| node_player_logic
node_game -->|"checks completion"| node_board
node_game -->|"refreshes view"| node_panel
node_game -->|"shows completion"| node_menus
node_player_logic -->|"checks and updates"| node_board
node_board -->|"loads layout"| node_levels
node_panel -->|"renders board"| node_board
node_panel -->|"reads move count"| node_player_logic
node_panel -->|"loads tile art"| node_graphics
node_music_manager -->|"plays"| node_menu_music
node_music_manager -->|"plays"| node_game_music

click node_main "https://github.com/maciopalis/smiecioban/blob/main/src/Main.java"
click node_menus "https://github.com/maciopalis/smiecioban/blob/main/src/Menus.java"
click node_game "https://github.com/maciopalis/smiecioban/blob/main/src/Game.java"
click node_player_logic "https://github.com/maciopalis/smiecioban/blob/main/src/Player.java"
click node_board "https://github.com/maciopalis/smiecioban/blob/main/src/Board.java"
click node_levels "https://github.com/maciopalis/smiecioban/blob/main/src/Levels.java"
click node_panel "https://github.com/maciopalis/smiecioban/blob/main/src/GamePanel.java"
click node_music_manager "https://github.com/maciopalis/smiecioban/blob/main/src/MusicManager.java"
click node_graphics "https://github.com/maciopalis/smiecioban/tree/main/graphics"
click node_menu_graphics "https://github.com/maciopalis/smiecioban/tree/main/graphics/garbageman"
click node_menu_music "https://github.com/maciopalis/smiecioban/blob/main/music/menu_music.wav"
click node_game_music "https://github.com/maciopalis/smiecioban/blob/main/music/game_music.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_main,node_menus,node_panel toneBlue
class node_game,node_player_logic,node_board,node_levels toneAmber
class node_music_manager,node_graphics,node_menu_graphics,node_menu_music,node_game_music toneMint
class node_player toneIndigo
```

## Components

### Application UI

- [Application start](https://github.com/maciopalis/smiecioban/blob/main/src/Main.java): `src/Main.java`
- [Menus](https://github.com/maciopalis/smiecioban/blob/main/src/Menus.java): `src/Menus.java`
- [Game rendering](https://github.com/maciopalis/smiecioban/blob/main/src/GamePanel.java): `src/GamePanel.java`

### Puzzle Runtime

- [Game controller](https://github.com/maciopalis/smiecioban/blob/main/src/Game.java): `src/Game.java`
- [Player movement](https://github.com/maciopalis/smiecioban/blob/main/src/Player.java): `src/Player.java`
- [Board rules](https://github.com/maciopalis/smiecioban/blob/main/src/Board.java): `src/Board.java`
- [Level layouts](https://github.com/maciopalis/smiecioban/blob/main/src/Levels.java): `src/Levels.java`

### Game Resources

- [Music manager](https://github.com/maciopalis/smiecioban/blob/main/src/MusicManager.java): `src/MusicManager.java`
- [Game graphics](https://github.com/maciopalis/smiecioban/tree/main/graphics): `graphics`
- [Menu character art](https://github.com/maciopalis/smiecioban/tree/main/graphics/garbageman): `graphics/garbageman`
- [Menu music](https://github.com/maciopalis/smiecioban/blob/main/music/menu_music.wav): `music/menu_music.wav`
- [Game music](https://github.com/maciopalis/smiecioban/blob/main/music/game_music.wav): `music/game_music.wav`

### Other components

- **Player**

## Connections

- Player → Application start: launches
- Application start → Menus: creates (evidence: `src/Main.java`)
- Menus → Music manager: starts music (evidence: `src/Menus.java`)
- Menus → Game controller: starts level (evidence: `src/Menus.java`)
- Menus → Menu character art: loads art (evidence: `src/Menus.java`)
- Menus → Music manager: stops music (evidence: `src/Menus.java`)
- Game controller → Music manager: plays music (evidence: `src/Game.java`)
- Game controller → Board rules: creates board (evidence: `src/Game.java`)
- Game controller → Player movement: creates player (evidence: `src/Game.java`)
- Game controller → Game rendering: creates panel (evidence: `src/Game.java`)
- Game controller → Player movement: dispatches moves (evidence: `src/Game.java`)
- Game controller → Board rules: checks completion (evidence: `src/Game.java`)
- Game controller → Game rendering: refreshes view (evidence: `src/Game.java`)
- Game controller → Menus: shows completion (evidence: `src/Game.java`)
- Player movement → Board rules: checks and updates (evidence: `src/Player.java`)
- Board rules → Level layouts: loads layout (evidence: `src/Board.java`)
- Game rendering → Board rules: renders board (evidence: `src/GamePanel.java`)
- Game rendering → Player movement: reads move count (evidence: `src/GamePanel.java`)
- Game rendering → Game graphics: loads tile art (evidence: `src/GamePanel.java`)
- Music manager → Menu music: plays (evidence: `src/MusicManager.java`)
- Music manager → Game music: plays (evidence: `src/MusicManager.java`)
