# shynobisuikast/blokhane architecture

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

- Interactive diagram: https://gitdiagram.com/shynobisuikast/blokhane
- Repository: https://github.com/shynobisuikast/blokhane

## Overview

Blokhane is a Godot block puzzle: players place pieces from a tray onto an 8×8 board, clear completed rows or columns, build combo score, and lose when no piece fits. The graph follows that documented gameplay and includes the README’s theme, settings, persistent-best-score, and audio capabilities. Source excerpts were not provided, so links between individual implementation scripts are omitted unless the README documents the relationship.

Main entry points: [`scripts/BoardView.gd`](https://github.com/shynobisuikast/blokhane/blob/main/scripts/BoardView.gd) (Puzzle board), [`scripts/GameRules.gd`](https://github.com/shynobisuikast/blokhane/blob/main/scripts/GameRules.gd) (Placement and clears), [`scripts/Tray.gd`](https://github.com/shynobisuikast/blokhane/blob/main/scripts/Tray.gd) (Piece tray), [`scripts/ScoreModel.gd`](https://github.com/shynobisuikast/blokhane/blob/main/scripts/ScoreModel.gd) (Combo score)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gameplay["Puzzle gameplay"]
  node_tray["Piece tray<br/>[Tray.gd]"]
  node_board["Puzzle board<br/>[BoardView.gd]"]
  node_rules["Placement and clears<br/>[GameRules.gd]"]
  node_score["Combo score<br/>[ScoreModel.gd]"]
end

subgraph group_screens["Screens and flow"]
  node_main_scene["Game entry<br/>[Main.tscn]"]
  node_menu["Menu<br/>[Menu.gd]"]
  node_game_over["Game over<br/>[GameOver.gd]"]
end

subgraph group_preferences["Preferences and feedback"]
  node_settings["Settings<br/>[Settings.gd]"]
  node_theme["Theme<br/>[ThemePalettes.gd]"]
  node_save_data[("Persistent best score<br/>[SaveData.gd]")]
  node_audio["Audio feedback<br/>[AudioManager.gd]"]
end

node_player(("Player"))

node_player -->|"launches"| node_main_scene
node_player -->|"drags piece"| node_tray
node_player -->|"places piece"| node_board
node_board -->|"checks placement"| node_rules
node_rules -->|"clears build combo"| node_score
node_player -->|"loses when none fit"| node_game_over
node_player -->|"changes preferences"| node_settings

click node_main_scene "https://github.com/shynobisuikast/blokhane/blob/main/scenes/Main.tscn"
click node_menu "https://github.com/shynobisuikast/blokhane/blob/main/scripts/Menu.gd"
click node_tray "https://github.com/shynobisuikast/blokhane/blob/main/scripts/Tray.gd"
click node_board "https://github.com/shynobisuikast/blokhane/blob/main/scripts/BoardView.gd"
click node_rules "https://github.com/shynobisuikast/blokhane/blob/main/scripts/GameRules.gd"
click node_score "https://github.com/shynobisuikast/blokhane/blob/main/scripts/ScoreModel.gd"
click node_game_over "https://github.com/shynobisuikast/blokhane/blob/main/scripts/GameOver.gd"
click node_settings "https://github.com/shynobisuikast/blokhane/blob/main/scripts/Settings.gd"
click node_theme "https://github.com/shynobisuikast/blokhane/blob/main/scripts/ThemePalettes.gd"
click node_save_data "https://github.com/shynobisuikast/blokhane/blob/main/scripts/SaveData.gd"
click node_audio "https://github.com/shynobisuikast/blokhane/blob/main/scripts/AudioManager.gd"

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_tray,node_board,node_rules,node_score toneBlue
class node_main_scene,node_menu,node_game_over toneAmber
class node_settings,node_theme,node_save_data,node_audio toneMint
class node_player toneIndigo
```

## Components

### Puzzle gameplay

- [Piece tray](https://github.com/shynobisuikast/blokhane/blob/main/scripts/Tray.gd): `scripts/Tray.gd`
- [Puzzle board](https://github.com/shynobisuikast/blokhane/blob/main/scripts/BoardView.gd): `scripts/BoardView.gd`
- [Placement and clears](https://github.com/shynobisuikast/blokhane/blob/main/scripts/GameRules.gd): `scripts/GameRules.gd`
- [Combo score](https://github.com/shynobisuikast/blokhane/blob/main/scripts/ScoreModel.gd): `scripts/ScoreModel.gd`

### Screens and flow

- [Game entry](https://github.com/shynobisuikast/blokhane/blob/main/scenes/Main.tscn): `scenes/Main.tscn`
- [Menu](https://github.com/shynobisuikast/blokhane/blob/main/scripts/Menu.gd): `scripts/Menu.gd`
- [Game over](https://github.com/shynobisuikast/blokhane/blob/main/scripts/GameOver.gd): `scripts/GameOver.gd`

### Preferences and feedback

- [Settings](https://github.com/shynobisuikast/blokhane/blob/main/scripts/Settings.gd): `scripts/Settings.gd`
- [Theme](https://github.com/shynobisuikast/blokhane/blob/main/scripts/ThemePalettes.gd): `scripts/ThemePalettes.gd`
- [Persistent best score](https://github.com/shynobisuikast/blokhane/blob/main/scripts/SaveData.gd): `scripts/SaveData.gd`
- [Audio feedback](https://github.com/shynobisuikast/blokhane/blob/main/scripts/AudioManager.gd): `scripts/AudioManager.gd`

### Other components

- **Player**

## Connections

- Player → Game entry: launches (evidence: `README.md`)
- Player → Piece tray: drags piece (evidence: `README.md`)
- Player → Puzzle board: places piece (evidence: `README.md`)
- Puzzle board → Placement and clears: checks placement (evidence: `README.md`)
- Placement and clears → Combo score: clears build combo (evidence: `README.md`)
- Player → Game over: loses when none fit (evidence: `README.md`)
- Player → Settings: changes preferences (evidence: `README.md`)
