# cordlessdisc/treasure-maze-hunt architecture

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

- Interactive diagram: https://gitdiagram.com/cordlessdisc/treasure-maze-hunt
- Repository: https://github.com/cordlessdisc/treasure-maze-hunt

## Overview

This is a small C99 console maze game, implemented entirely in one source file. Its workflow is: initialize a 6×6 field and display instructions, repeatedly render the field and read a move, update the player position within bounds, then check for treasure or a trap. The source uses temporary trap markers and clears them before marking the player. The README documents the controls and objective; no separate services or storage are present.

Main entry points: [`The Lost Treasure of EL DORADO!.c`](https://github.com/cordlessdisc/treasure-maze-hunt/blob/main/The%20Lost%20Treasure%20of%20EL%20DORADO!.c) (Game loop)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_game["Maze game"]
  node_game_loop["Game loop"]
  node_maze_state["Maze state"]
end

node_player(("Player"))
node_console["Console"]

node_player -->|"starts and moves"| node_game_loop
node_game_loop -->|"initializes and updates"| node_maze_state
node_game_loop -->|"prints and reads"| node_console
node_game_loop -->|"checks outcome"| node_maze_state

click node_game_loop "https://github.com/cordlessdisc/treasure-maze-hunt/blob/main/The%20Lost%20Treasure%20of%20EL%20DORADO!.c"
click node_maze_state "https://github.com/cordlessdisc/treasure-maze-hunt/blob/main/The%20Lost%20Treasure%20of%20EL%20DORADO!.c"

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_game_loop,node_maze_state toneBlue
class node_player,node_console toneIndigo
```

## Components

### Maze game

- [Game loop](https://github.com/cordlessdisc/treasure-maze-hunt/blob/main/The%20Lost%20Treasure%20of%20EL%20DORADO!.c): `The Lost Treasure of EL DORADO!.c`
- [Maze state](https://github.com/cordlessdisc/treasure-maze-hunt/blob/main/The%20Lost%20Treasure%20of%20EL%20DORADO!.c): `The Lost Treasure of EL DORADO!.c`

### Other components

- **Player**
- **Console**

## Connections

- Player → Game loop: starts and moves (evidence: `The Lost Treasure of EL DORADO!.c`)
- Game loop → Maze state: initializes and updates (evidence: `The Lost Treasure of EL DORADO!.c`)
- Game loop → Console: prints and reads (evidence: `The Lost Treasure of EL DORADO!.c`)
- Game loop → Maze state: checks outcome (evidence: `The Lost Treasure of EL DORADO!.c`)
