# 896pw85v/cs61b-sp24-proj-3-byow architecture

> Architecture diagram of the GitHub repository 896pw85v/cs61b-sp24-proj-3-byow, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/896pw85v/cs61b-sp24-proj-3-byow
- Repository: https://github.com/896pw85v/cs61b-sp24-proj-3-byow

## Overview

This is a Java tile-world dungeon generator with a small playable/rendering demo and an autograder-facing world-generation entry point. The principal workflow seeds a world, lays out rooms, links their origins, adds walls, then returns or renders the tile grid; the demo also places an avatar and applies hard-coded movement. The graph reflects the sampled implementation. The README is empty, and other source files were not sampled, so no additional capabilities or wiring are inferred.

Main entry points: [`src/core/World.java`](https://github.com/896pw85v/cs61b-sp24-proj-3-byow/blob/main/src/core/World.java) (World builder), [`src/core/Main.java`](https://github.com/896pw85v/cs61b-sp24-proj-3-byow/blob/main/src/core/Main.java) (Demo loop), [`src/tileengine/TETile.java`](https://github.com/896pw85v/cs61b-sp24-proj-3-byow/blob/main/src/tileengine/TETile.java) (Tile value), [`src/tileengine/TERenderer.java`](https://github.com/896pw85v/cs61b-sp24-proj-3-byow/blob/main/src/tileengine/TERenderer.java) (Tile renderer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry points"]
  node_main["Demo loop<br/>[Main.java]"]
  node_autograder["Input adapter"]
end

subgraph group_generation["World generation"]
  node_world["World builder<br/>[World.java]"]
  node_origin_net["Origin network<br/>[OriginNet.java]"]
  node_origin["Room origin<br/>[Origin.java]"]
end

subgraph group_tiles["Tiles and rendering"]
  node_tile_set["Tile palette<br/>[Tileset.java]"]
  node_tile["Tile value<br/>[TETile.java]"]
  node_renderer["Tile renderer<br/>[TERenderer.java]"]
  node_random_utils["Random helpers<br/>[RandomUtils.java]"]
end

node_player(("Player"))
node_stddraw["StdDraw"]

node_player -->|"starts demo"| node_main
node_main -->|"generates world"| node_world
node_main -->|"marks avatar"| node_tile_set
node_main -->|"draws tiles"| node_renderer
node_main -->|"reads mouse, draws HUD"| node_stddraw
node_autograder -->|"seeds and generates"| node_world
node_world -->|"builds links"| node_origin_net
node_world -->|"creates origins"| node_origin
node_world -->|"fills grid"| node_tile_set
node_world -->|"renders progress"| node_renderer
node_origin_net -->|"stores origins"| node_origin
node_renderer -->|"draws each tile"| node_tile
node_tile -->|"draws glyphs"| node_stddraw
node_tile -->|"varies color"| node_random_utils

click node_main "https://github.com/896pw85v/cs61b-sp24-proj-3-byow/blob/main/src/core/Main.java"
click node_autograder "https://github.com/896pw85v/cs61b-sp24-proj-3-byow/blob/main/src/core/AutograderBuddy.java"
click node_world "https://github.com/896pw85v/cs61b-sp24-proj-3-byow/blob/main/src/core/World.java"
click node_origin_net "https://github.com/896pw85v/cs61b-sp24-proj-3-byow/blob/main/src/core/OriginNet.java"
click node_origin "https://github.com/896pw85v/cs61b-sp24-proj-3-byow/blob/main/src/core/Origin.java"
click node_tile_set "https://github.com/896pw85v/cs61b-sp24-proj-3-byow/blob/main/src/tileengine/Tileset.java"
click node_tile "https://github.com/896pw85v/cs61b-sp24-proj-3-byow/blob/main/src/tileengine/TETile.java"
click node_renderer "https://github.com/896pw85v/cs61b-sp24-proj-3-byow/blob/main/src/tileengine/TERenderer.java"
click node_random_utils "https://github.com/896pw85v/cs61b-sp24-proj-3-byow/blob/main/src/utils/RandomUtils.java"

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_main,node_autograder toneBlue
class node_world,node_origin_net,node_origin toneAmber
class node_tile_set,node_tile,node_renderer,node_random_utils toneMint
class node_player,node_stddraw toneIndigo
```

## Components

### Entry points

- [Demo loop](https://github.com/896pw85v/cs61b-sp24-proj-3-byow/blob/main/src/core/Main.java): `src/core/Main.java`
- [Input adapter](https://github.com/896pw85v/cs61b-sp24-proj-3-byow/blob/main/src/core/AutograderBuddy.java): `src/core/AutograderBuddy.java`

### World generation

- [World builder](https://github.com/896pw85v/cs61b-sp24-proj-3-byow/blob/main/src/core/World.java): `src/core/World.java`
- [Origin network](https://github.com/896pw85v/cs61b-sp24-proj-3-byow/blob/main/src/core/OriginNet.java): `src/core/OriginNet.java`
- [Room origin](https://github.com/896pw85v/cs61b-sp24-proj-3-byow/blob/main/src/core/Origin.java): `src/core/Origin.java`

### Tiles and rendering

- [Tile palette](https://github.com/896pw85v/cs61b-sp24-proj-3-byow/blob/main/src/tileengine/Tileset.java): `src/tileengine/Tileset.java`
- [Tile value](https://github.com/896pw85v/cs61b-sp24-proj-3-byow/blob/main/src/tileengine/TETile.java): `src/tileengine/TETile.java`
- [Tile renderer](https://github.com/896pw85v/cs61b-sp24-proj-3-byow/blob/main/src/tileengine/TERenderer.java): `src/tileengine/TERenderer.java`
- [Random helpers](https://github.com/896pw85v/cs61b-sp24-proj-3-byow/blob/main/src/utils/RandomUtils.java): `src/utils/RandomUtils.java`

### Other components

- **Player**
- **StdDraw**

## Connections

- Player → Demo loop: starts demo
- Demo loop → World builder: generates world
- Demo loop → Tile palette: marks avatar
- Demo loop → Tile renderer: draws tiles
- Demo loop → StdDraw: reads mouse, draws HUD
- Input adapter → World builder: seeds and generates
- World builder → Origin network: builds links
- World builder → Room origin: creates origins
- World builder → Tile palette: fills grid
- World builder → Tile renderer: renders progress
- Origin network → Room origin: stores origins
- Tile renderer → Tile value: draws each tile
- Tile value → StdDraw: draws glyphs
- Tile value → Random helpers: varies color
