# brax1000/c-four---bomb-defusal-simulator architecture

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

- Interactive diagram: https://gitdiagram.com/brax1000/c-four---bomb-defusal-simulator
- Repository: https://github.com/brax1000/c-four---bomb-defusal-simulator

## Overview

BOMBS is a bomb-defusal number-guessing game. In the main Raylib version, the player chooses a difficulty, enters guesses against a secret code under a timer and attempt limit, and reaches win or loss screens; the same loop handles menu, instructions, and pause states. A separate first prototype implements the guessing game in a console. The README is minimal, so this map relies on the two sampled C files and does not assume additional features.

Main entry points: [`Prototype0.c`](https://github.com/brax1000/c-four---bomb-defusal-simulator/blob/main/Prototype0.c) (Game loop), [`FirstPrototype.c`](https://github.com/brax1000/c-four---bomb-defusal-simulator/blob/main/FirstPrototype.c) (Console game)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_raylib_game["Raylib Game"]
  node_raylib_app["Game loop<br/>[Prototype0.c]"]
  node_game_rules["Game state<br/>[Prototype0.c]"]
  node_game_screens["Game screens<br/>[Prototype0.c]"]
end

subgraph group_console_prototype["Console Prototype"]
  node_console_game["Console game<br/>[FirstPrototype.c]"]
end

node_player(("Player"))
node_raylib["Raylib"]

node_player -->|"provides input"| node_raylib_app
node_raylib_app -->|"updates state"| node_game_rules
node_raylib_app -->|"dispatches drawing"| node_game_screens
node_raylib_app -->|"uses graphics"| node_raylib
node_player -->|"enters guesses"| node_console_game

click node_raylib_app "https://github.com/brax1000/c-four---bomb-defusal-simulator/blob/main/Prototype0.c"
click node_game_rules "https://github.com/brax1000/c-four---bomb-defusal-simulator/blob/main/Prototype0.c"
click node_game_screens "https://github.com/brax1000/c-four---bomb-defusal-simulator/blob/main/Prototype0.c"
click node_console_game "https://github.com/brax1000/c-four---bomb-defusal-simulator/blob/main/FirstPrototype.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_raylib_app,node_game_rules,node_game_screens toneBlue
class node_console_game toneAmber
class node_player,node_raylib toneIndigo
```

## Components

### Raylib Game

- [Game loop](https://github.com/brax1000/c-four---bomb-defusal-simulator/blob/main/Prototype0.c): `Prototype0.c`
- [Game state](https://github.com/brax1000/c-four---bomb-defusal-simulator/blob/main/Prototype0.c): `Prototype0.c`
- [Game screens](https://github.com/brax1000/c-four---bomb-defusal-simulator/blob/main/Prototype0.c): `Prototype0.c`

### Console Prototype

- [Console game](https://github.com/brax1000/c-four---bomb-defusal-simulator/blob/main/FirstPrototype.c): `FirstPrototype.c`

### Other components

- **Player**
- **Raylib**

## Connections

- Player → Game loop: provides input (evidence: `Prototype0.c`)
- Game loop → Game state: updates state (evidence: `Prototype0.c`)
- Game loop → Game screens: dispatches drawing (evidence: `Prototype0.c`)
- Game loop → Raylib: uses graphics (evidence: `Prototype0.c`)
- Player → Console game: enters guesses (evidence: `FirstPrototype.c`)
