# xbmm1/2048 architecture

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

- Interactive diagram: https://gitdiagram.com/xbmm1/2048
- Repository: https://github.com/xbmm1/2048

## Overview

This repository is a collection of browser projects, not one integrated application. The root README documents the 2048 game and a separate retirement-administration learning project; sampled source also identifies a maze-based crawler and Void Runner. The graph separates these products and shows their documented user-facing paths. Retirement capabilities are represented from the root README rather than inspected implementation; the sampled game excerpts show only some internal wiring, so other connections are omitted.

Main entry points: [`Project_Root/retirement-system/src/main/java/org/example/retirement/web`](https://github.com/xbmm1/2048/tree/main/Project_Root/retirement-system/src/main/java/org/example/retirement/web) (Staff Portal), [`Project_Root/Run/game.js`](https://github.com/xbmm1/2048/blob/main/Project_Root/Run/game.js) (Runner Game), [`Project_Root/doom-crawler/doom2/js/game.js`](https://github.com/xbmm1/2048/blob/main/Project_Root/doom-crawler/doom2/js/game.js) (Game Loop), [`2048-with-scores.html`](https://github.com/xbmm1/2048/blob/main/2048-with-scores.html) (2048 Game)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_puzzle["2048 Puzzle"]
  node_game2048["2048 Game"]
  node_strategies["AI Strategies"]
  node_simulator["Batch Simulator"]
  node_scorehistory[("Score History")]
  node_strategyguide["Strategy Guide"]
end

subgraph group_retirement["Retirement Administration"]
  node_retirementportal["Staff Portal"]
  node_contributions["Contribution Imports"]
  node_memberadmin["Member Administration"]
  node_benefits["Pension Estimates"]
  node_approvals["Independent Approvals"]
  node_audit["Audit History"]
  node_reports["PDF Reporting"]
  node_retirementdb[("PostgreSQL")]
end

subgraph group_crawler["Doom Crawler"]
  node_crawlergame["Game Loop<br/>[game.js]"]
  node_maze["Maze Generator<br/>[maze.js]"]
  node_astar["Enemy Pathfinding<br/>[astar.js]"]
  node_raycaster["Raycasting Renderer<br/>[raycaster.js]"]
end

subgraph group_runner["Void Runner"]
  node_runnergame["Runner Game<br/>[game.js]"]
  node_input["Input Manager<br/>[game.js]"]
  node_audio["Audio Manager<br/>[game.js]"]
  node_tunnel["Tunnel Generator<br/>[game.js]"]
  node_renderer["Canvas Renderer<br/>[game.js]"]
  node_runnerui["Game UI<br/>[game.js]"]
end

node_player(("Player"))
node_staff(("Staff"))
node_crawlerplayer(("Crawler Player"))
node_runnerplayer(("Runner Player"))

node_player -->|"plays"| node_game2048
node_game2048 -->|"selects policy"| node_strategies
node_game2048 -->|"stores scores"| node_scorehistory
node_player -->|"runs batches"| node_simulator
node_simulator -->|"simulates policy"| node_strategies
node_simulator -->|"stores results"| node_scorehistory
node_player -->|"opens guide"| node_strategyguide
node_staff -->|"uses portal"| node_retirementportal
node_retirementportal -->|"imports batches"| node_contributions
node_retirementportal -->|"administers members"| node_memberadmin
node_retirementportal -->|"requests estimates"| node_benefits
node_retirementportal -->|"routes approvals"| node_approvals
node_retirementportal -->|"records history"| node_audit
node_retirementportal -->|"requests PDFs"| node_reports
node_retirementportal -->|"uses PostgreSQL"| node_retirementdb
node_crawlerplayer -.->|"plays"| node_crawlergame
node_crawlergame -->|"generates levels"| node_maze
node_crawlergame -->|"routes enemies"| node_astar
node_crawlergame -->|"renders scene"| node_raycaster
node_runnerplayer -.->|"plays"| node_runnergame
node_runnergame -->|"creates"| node_input
node_runnergame -->|"creates"| node_audio
node_runnergame -->|"creates"| node_tunnel
node_runnergame -->|"creates"| node_renderer
node_runnergame -->|"creates"| node_runnerui

click node_game2048 "https://github.com/xbmm1/2048/blob/main/2048-with-scores.html"
click node_strategies "https://github.com/xbmm1/2048/blob/main/2048-with-scores.html"
click node_simulator "https://github.com/xbmm1/2048/blob/main/2048-with-scores.html"
click node_scorehistory "https://github.com/xbmm1/2048/blob/main/2048-with-scores.html"
click node_strategyguide "https://github.com/xbmm1/2048/blob/main/2048-strategies.html"
click node_retirementportal "https://github.com/xbmm1/2048/tree/main/Project_Root/retirement-system/src/main/java/org/example/retirement/web"
click node_contributions "https://github.com/xbmm1/2048/tree/main/Project_Root/retirement-system/src/main/java/org/example/retirement/contribution"
click node_memberadmin "https://github.com/xbmm1/2048/tree/main/Project_Root/retirement-system/src/main/java/org/example/retirement/member"
click node_benefits "https://github.com/xbmm1/2048/tree/main/Project_Root/retirement-system/src/main/java/org/example/retirement/benefit"
click node_approvals "https://github.com/xbmm1/2048/tree/main/Project_Root/retirement-system/src/main/java/org/example/retirement/retirement"
click node_audit "https://github.com/xbmm1/2048/tree/main/Project_Root/retirement-system/src/main/java/org/example/retirement/audit"
click node_reports "https://github.com/xbmm1/2048/tree/main/Project_Root/retirement-system/src/main/java/org/example/retirement/reporting"
click node_crawlergame "https://github.com/xbmm1/2048/blob/main/Project_Root/doom-crawler/doom2/js/game.js"
click node_maze "https://github.com/xbmm1/2048/blob/main/Project_Root/doom-crawler/doom2/js/maze.js"
click node_astar "https://github.com/xbmm1/2048/blob/main/Project_Root/doom-crawler/doom2/js/astar.js"
click node_raycaster "https://github.com/xbmm1/2048/blob/main/Project_Root/doom-crawler/doom2/js/raycaster.js"
click node_runnergame "https://github.com/xbmm1/2048/blob/main/Project_Root/Run/game.js"
click node_input "https://github.com/xbmm1/2048/blob/main/Project_Root/Run/game.js"
click node_audio "https://github.com/xbmm1/2048/blob/main/Project_Root/Run/game.js"
click node_tunnel "https://github.com/xbmm1/2048/blob/main/Project_Root/Run/game.js"
click node_renderer "https://github.com/xbmm1/2048/blob/main/Project_Root/Run/game.js"
click node_runnerui "https://github.com/xbmm1/2048/blob/main/Project_Root/Run/game.js"

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_game2048,node_strategies,node_simulator,node_scorehistory,node_strategyguide toneBlue
class node_retirementportal,node_contributions,node_memberadmin,node_benefits,node_approvals,node_audit,node_reports,node_retirementdb toneAmber
class node_crawlergame,node_maze,node_astar,node_raycaster toneMint
class node_runnergame,node_input,node_audio,node_tunnel,node_renderer,node_runnerui toneRose
class node_player,node_staff,node_crawlerplayer,node_runnerplayer toneIndigo
```

## Components

### 2048 Puzzle

- [2048 Game](https://github.com/xbmm1/2048/blob/main/2048-with-scores.html): `2048-with-scores.html`
- [AI Strategies](https://github.com/xbmm1/2048/blob/main/2048-with-scores.html): `2048-with-scores.html`
- [Batch Simulator](https://github.com/xbmm1/2048/blob/main/2048-with-scores.html): `2048-with-scores.html`
- [Score History](https://github.com/xbmm1/2048/blob/main/2048-with-scores.html): `2048-with-scores.html`
- [Strategy Guide](https://github.com/xbmm1/2048/blob/main/2048-strategies.html): `2048-strategies.html`

### Retirement Administration

- [Staff Portal](https://github.com/xbmm1/2048/tree/main/Project_Root/retirement-system/src/main/java/org/example/retirement/web): `Project_Root/retirement-system/src/main/java/org/example/retirement/web`
- [Contribution Imports](https://github.com/xbmm1/2048/tree/main/Project_Root/retirement-system/src/main/java/org/example/retirement/contribution): `Project_Root/retirement-system/src/main/java/org/example/retirement/contribution`
- [Member Administration](https://github.com/xbmm1/2048/tree/main/Project_Root/retirement-system/src/main/java/org/example/retirement/member): `Project_Root/retirement-system/src/main/java/org/example/retirement/member`
- [Pension Estimates](https://github.com/xbmm1/2048/tree/main/Project_Root/retirement-system/src/main/java/org/example/retirement/benefit): `Project_Root/retirement-system/src/main/java/org/example/retirement/benefit`
- [Independent Approvals](https://github.com/xbmm1/2048/tree/main/Project_Root/retirement-system/src/main/java/org/example/retirement/retirement): `Project_Root/retirement-system/src/main/java/org/example/retirement/retirement`
- [Audit History](https://github.com/xbmm1/2048/tree/main/Project_Root/retirement-system/src/main/java/org/example/retirement/audit): `Project_Root/retirement-system/src/main/java/org/example/retirement/audit`
- [PDF Reporting](https://github.com/xbmm1/2048/tree/main/Project_Root/retirement-system/src/main/java/org/example/retirement/reporting): `Project_Root/retirement-system/src/main/java/org/example/retirement/reporting`
- **PostgreSQL**

### Doom Crawler

- [Game Loop](https://github.com/xbmm1/2048/blob/main/Project_Root/doom-crawler/doom2/js/game.js): `Project_Root/doom-crawler/doom2/js/game.js`
- [Maze Generator](https://github.com/xbmm1/2048/blob/main/Project_Root/doom-crawler/doom2/js/maze.js): `Project_Root/doom-crawler/doom2/js/maze.js`
- [Enemy Pathfinding](https://github.com/xbmm1/2048/blob/main/Project_Root/doom-crawler/doom2/js/astar.js): `Project_Root/doom-crawler/doom2/js/astar.js`
- [Raycasting Renderer](https://github.com/xbmm1/2048/blob/main/Project_Root/doom-crawler/doom2/js/raycaster.js): `Project_Root/doom-crawler/doom2/js/raycaster.js`

### Void Runner

- [Runner Game](https://github.com/xbmm1/2048/blob/main/Project_Root/Run/game.js): `Project_Root/Run/game.js`
- [Input Manager](https://github.com/xbmm1/2048/blob/main/Project_Root/Run/game.js): `Project_Root/Run/game.js`
- [Audio Manager](https://github.com/xbmm1/2048/blob/main/Project_Root/Run/game.js): `Project_Root/Run/game.js`
- [Tunnel Generator](https://github.com/xbmm1/2048/blob/main/Project_Root/Run/game.js): `Project_Root/Run/game.js`
- [Canvas Renderer](https://github.com/xbmm1/2048/blob/main/Project_Root/Run/game.js): `Project_Root/Run/game.js`
- [Game UI](https://github.com/xbmm1/2048/blob/main/Project_Root/Run/game.js): `Project_Root/Run/game.js`

### Other components

- **Player**
- **Staff**
- **Crawler Player**
- **Runner Player**

## Connections

- Player → 2048 Game: plays (evidence: `README.md`)
- 2048 Game → AI Strategies: selects policy (evidence: `README.md`)
- 2048 Game → Score History: stores scores (evidence: `README.md`)
- Player → Batch Simulator: runs batches (evidence: `README.md`)
- Batch Simulator → AI Strategies: simulates policy (evidence: `README.md`)
- Batch Simulator → Score History: stores results (evidence: `README.md`)
- Player → Strategy Guide: opens guide (evidence: `README.md`)
- Staff → Staff Portal: uses portal (evidence: `README.md`)
- Staff Portal → Contribution Imports: imports batches (evidence: `README.md`)
- Staff Portal → Member Administration: administers members (evidence: `README.md`)
- Staff Portal → Pension Estimates: requests estimates (evidence: `README.md`)
- Staff Portal → Independent Approvals: routes approvals (evidence: `README.md`)
- Staff Portal → Audit History: records history (evidence: `README.md`)
- Staff Portal → PDF Reporting: requests PDFs (evidence: `README.md`)
- Staff Portal → PostgreSQL: uses PostgreSQL (evidence: `README.md`)
- Crawler Player → Game Loop: plays
- Game Loop → Maze Generator: generates levels (evidence: `Project_Root/doom-crawler/doom2/js/game.js`)
- Game Loop → Enemy Pathfinding: routes enemies (evidence: `Project_Root/doom-crawler/doom2/js/game.js`)
- Game Loop → Raycasting Renderer: renders scene (evidence: `Project_Root/doom-crawler/doom2/js/game.js`)
- Runner Player → Runner Game: plays
- Runner Game → Input Manager: creates (evidence: `Project_Root/Run/game.js`)
- Runner Game → Audio Manager: creates (evidence: `Project_Root/Run/game.js`)
- Runner Game → Tunnel Generator: creates (evidence: `Project_Root/Run/game.js`)
- Runner Game → Canvas Renderer: creates (evidence: `Project_Root/Run/game.js`)
- Runner Game → Game UI: creates (evidence: `Project_Root/Run/game.js`)
