# One-shot Factory

**Theme:** Scrapyard Orbital Refinery
**Core Loop:** Sorting raw orbital scrap into refined elements and advanced circuits.
**Pressure:** Efficiently route materials without deadlocking conveyors while maximising throughput score.

## Systems

- **Resources:** Scrap, Iron, Copper, Plate, Wire, Circuit.
- **Machines:**
  - **Extractor:** Pulls Raw Scrap from orbital debris fields.
  - **Sorter:** Separates Scrap into Iron and Copper.
  - **Smelter:** Refines Iron into Plates, or Copper into Wire.
  - **Assembler:** Combines Plate + Wire into a Circuit.
  - **Conveyor:** Moves items sequentially between adjacent tiles.
  - **Exporter:** Consumes Circuits and awards points/throughput.
- **Interactions:**
  - Toolbar to select and place/remove machines on a grid.
  - Dragging or clicking to draw conveyors.
  - Desktop (mouse) and mobile (touch) support.
- **Simulation:**
  - Tick-based flow.
  - Items move along conveyors and enter machines.
  - Machines have processing times and limited internal buffers.
  - Bottlenecks cause conveyors to back up, visible to the player.
- **UI:**
  - Live throughput graph and per-minute counters (e.g., Circuits/min).
  - Start, Pause, Resume, Reset controls.
  - Build/Destroy mode toggle.

## Tech Constraints
- Single `.html` file.
- Vanilla HTML, CSS, JS (Canvas API for rendering the grid, items, and machines).
- No external libraries or assets.
