# jegjegovich/labyrinthapp-cpp- architecture

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

- Interactive diagram: https://gitdiagram.com/jegjegovich/labyrinthapp-cpp-
- Repository: https://github.com/jegjegovich/labyrinthapp-cpp-

## Overview

This is an interactive C++ maze generator and solver using SFML. The documented workflow is to set maze dimensions, generate a random maze, then either navigate it manually or display the automatic solution; users can also request a new maze. The excerpts show maze generation, solution search, drawing, and reusable input controls. The README describes the application features, but the entry point and menu implementation were not sampled, so their runtime wiring is shown only as unverified.

Main entry points: [`Menu.cpp`](https://github.com/jegjegovich/labyrinthapp-cpp-/blob/main/Menu.cpp) (Menu actions), [`Labyrinth.cpp`](https://github.com/jegjegovich/labyrinthapp-cpp-/blob/main/Labyrinth.cpp) (Maze state), [`textFeld.cpp`](https://github.com/jegjegovich/labyrinthapp-cpp-/blob/main/textFeld.cpp) (Dimension input), [`Player.cpp`](https://github.com/jegjegovich/labyrinthapp-cpp-/blob/main/Player.cpp) (Player movement)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["User interface"]
  node_menu["Menu actions<br/>[Menu.cpp]"]
  node_buttons["Button controls<br/>[Button.cpp]"]
  node_dimensions["Dimension input<br/>[textFeld.cpp]"]
end

subgraph group_maze["Maze domain"]
  node_maze_state[("Maze state<br/>[Labyrinth.cpp]")]
  node_generation["Maze generation<br/>[Labyrinth.cpp]"]
  node_solver["Solution search<br/>[Labyrinth.cpp]"]
  node_maze_render["Maze rendering<br/>[Labyrinth.cpp]"]
  node_player["Player movement<br/>[Player.cpp]"]
end

subgraph group_runtime["Application runtime"]
  node_app["Application loop<br/>[main.cpp]"]
end

node_user(("User"))

node_user -.->|"uses"| node_app
node_user -->|"chooses actions"| node_menu
node_user -->|"sets dimensions"| node_dimensions
node_menu -.->|"requests maze"| node_generation
node_dimensions -.->|"sets dimensions"| node_generation
node_generation -->|"creates maze"| node_maze_state
node_menu -->|"requests solution"| node_solver
node_solver -->|"reads maze"| node_maze_state
node_maze_state -->|"renders maze"| node_maze_render
node_user -->|"plays maze"| node_player
node_player -.->|"traverses maze"| node_maze_state
node_menu -->|"requests new maze"| node_generation

click node_app "https://github.com/jegjegovich/labyrinthapp-cpp-/blob/main/main.cpp"
click node_menu "https://github.com/jegjegovich/labyrinthapp-cpp-/blob/main/Menu.cpp"
click node_buttons "https://github.com/jegjegovich/labyrinthapp-cpp-/blob/main/Button.cpp"
click node_dimensions "https://github.com/jegjegovich/labyrinthapp-cpp-/blob/main/textFeld.cpp"
click node_maze_state "https://github.com/jegjegovich/labyrinthapp-cpp-/blob/main/Labyrinth.cpp"
click node_generation "https://github.com/jegjegovich/labyrinthapp-cpp-/blob/main/Labyrinth.cpp"
click node_solver "https://github.com/jegjegovich/labyrinthapp-cpp-/blob/main/Labyrinth.cpp"
click node_maze_render "https://github.com/jegjegovich/labyrinthapp-cpp-/blob/main/Labyrinth.cpp"
click node_player "https://github.com/jegjegovich/labyrinthapp-cpp-/blob/main/Player.cpp"

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_menu,node_buttons,node_dimensions,node_user toneBlue
class node_maze_state,node_generation,node_solver,node_maze_render,node_player toneAmber
class node_app toneMint
```

## Components

### User interface

- [Menu actions](https://github.com/jegjegovich/labyrinthapp-cpp-/blob/main/Menu.cpp): `Menu.cpp`
- [Button controls](https://github.com/jegjegovich/labyrinthapp-cpp-/blob/main/Button.cpp): `Button.cpp`
- [Dimension input](https://github.com/jegjegovich/labyrinthapp-cpp-/blob/main/textFeld.cpp): `textFeld.cpp`

### Maze domain

- [Maze state](https://github.com/jegjegovich/labyrinthapp-cpp-/blob/main/Labyrinth.cpp): `Labyrinth.cpp`
- [Maze generation](https://github.com/jegjegovich/labyrinthapp-cpp-/blob/main/Labyrinth.cpp): `Labyrinth.cpp`
- [Solution search](https://github.com/jegjegovich/labyrinthapp-cpp-/blob/main/Labyrinth.cpp): `Labyrinth.cpp`
- [Maze rendering](https://github.com/jegjegovich/labyrinthapp-cpp-/blob/main/Labyrinth.cpp): `Labyrinth.cpp`
- [Player movement](https://github.com/jegjegovich/labyrinthapp-cpp-/blob/main/Player.cpp): `Player.cpp`

### Application runtime

- [Application loop](https://github.com/jegjegovich/labyrinthapp-cpp-/blob/main/main.cpp): `main.cpp`

### Other components

- **User**

## Connections

- User → Application loop: uses
- User → Menu actions: chooses actions
- User → Dimension input: sets dimensions
- Menu actions → Maze generation: requests maze
- Dimension input → Maze generation: sets dimensions
- Maze generation → Maze state: creates maze (evidence: `Labyrinth.cpp`)
- Menu actions → Solution search: requests solution
- Solution search → Maze state: reads maze (evidence: `Labyrinth.cpp`)
- Maze state → Maze rendering: renders maze (evidence: `Labyrinth.cpp`)
- User → Player movement: plays maze
- Player movement → Maze state: traverses maze
- Menu actions → Maze generation: requests new maze
