# jpach-cs/se322mt_miner architecture

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

- Interactive diagram: https://gitdiagram.com/jpach-cs/se322mt_miner
- Repository: https://github.com/jpach-cs/se322mt_miner

## Overview

Montana Tech Miner is a small C platform-game prototype. The principal workflow is keyboard movement and jumping, followed by physics and floor/boundary handling, sprite-frame selection, and drawing the miner and floor. These stages are implemented together in one game loop rather than separate modules. The loop uses raylib for window, input, texture, and drawing operations and raymath for vector arithmetic; it also attempts to load a sprite from resources. The source shows no broader game systems. The resource directory’s contents were not provided, so the sprite’s presence is unverified.

Main entry points: [`src/main.c`](https://github.com/jpach-cs/se322mt_miner/blob/main/src/main.c) (Miner game loop), [`include/raylib.h`](https://github.com/jpach-cs/se322mt_miner/blob/main/include/raylib.h) (Window and graphics API), [`include/raymath.h`](https://github.com/jpach-cs/se322mt_miner/blob/main/include/raymath.h) (Vector math API), [`resources`](https://github.com/jpach-cs/se322mt_miner/tree/main/resources) (Miner sprite asset)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_game["Game prototype"]
  node_player["Miner game loop<br/>[main.c]"]
end

subgraph group_runtime["Runtime APIs"]
  node_raylib["Window and graphics API<br/>[raylib.h]"]
  node_raymath["Vector math API<br/>[raymath.h]"]
end

subgraph group_assets["Game assets"]
  node_sprite["Miner sprite asset"]
end

node_keyboard(("Player"))

node_keyboard -->|"provides input"| node_player
node_player -->|"uses window, input, drawing"| node_raylib
node_player -->|"adds position vectors"| node_raymath
node_player -->|"loads texture"| node_sprite

click node_player "https://github.com/jpach-cs/se322mt_miner/blob/main/src/main.c"
click node_raylib "https://github.com/jpach-cs/se322mt_miner/blob/main/include/raylib.h"
click node_raymath "https://github.com/jpach-cs/se322mt_miner/blob/main/include/raymath.h"
click node_sprite "https://github.com/jpach-cs/se322mt_miner/tree/main/resources"

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_player toneBlue
class node_raylib,node_raymath toneAmber
class node_sprite toneMint
class node_keyboard toneIndigo
```

## Components

### Game prototype

- [Miner game loop](https://github.com/jpach-cs/se322mt_miner/blob/main/src/main.c): `src/main.c`

### Runtime APIs

- [Window and graphics API](https://github.com/jpach-cs/se322mt_miner/blob/main/include/raylib.h): `include/raylib.h`
- [Vector math API](https://github.com/jpach-cs/se322mt_miner/blob/main/include/raymath.h): `include/raymath.h`

### Game assets

- [Miner sprite asset](https://github.com/jpach-cs/se322mt_miner/tree/main/resources): `resources`

### Other components

- **Player**

## Connections

- Player → Miner game loop: provides input (evidence: `readme.md`)
- Miner game loop → Window and graphics API: uses window, input, drawing (evidence: `src/main.c`)
- Miner game loop → Vector math API: adds position vectors (evidence: `src/main.c`)
- Miner game loop → Miner sprite asset: loads texture (evidence: `src/main.c`)
