Project Structure

cmd-space-rider/
  index.html          # Browser version (canvas terminal emulator, zero dependencies)
  src/
    index.ts        # CLI entry point, terminal setup, main loop
    input.ts        # Key tables, raw stdin decoding, and key decay windows
    game.ts         # Game engine: state, physics, collision, entity management
    render.ts       # Terminal renderer: tunnel, ship, entities, HUD, effects
    menu.ts         # Menu screens: title, debug menu, game over
    screen.ts       # Double-buffered ANSI screen buffer
    types.ts        # Types, shared constants, colors, and the seeded RNG
  test/
    helpers.mjs                 # Shared test rigging
    engagement.mjs              # One pulse cannon engagement, at any grid
    page-style.mjs              # Resolves a stylesheet this repository ships
    probes/                     # Figures the comments and tests quote, reported
      probes.mjs                # The probe table: every probe, and the flags it reads
      run.mjs                   # The probe rig: parses a command line and runs one
      column.mjs                # Volley spread, column creep, and the far band's kills
      drop-clip.mjs             # What the tracer's drop clip costs a whole frame
      frame-rate.mjs            # Whether a shot resolves the same at any frame length
      free-flight.mjs           # Screen against register, in a run nobody staged
      seen-versus-kill.mjs      # Kills with no tracer, and tracers with no kill
      suite-replay.mjs          # The suite's own bands, replayed at a given grid
      versus-half.mjs           # The narrowest half the split screen's HUD reads in
      overlay-anchor.mjs        # Viewports the touch overlay is placed wrongly on
      glyph-tuning.mjs          # The figures the browser glyph centring quotes, rebuilt
    browser-engine.test.mjs     # Browser build behaviour
    terminal-engine.test.mjs    # Terminal build behaviour
    input.test.mjs              # Terminal input decoding and key repeat
    menu-layout.test.mjs        # Menu screens fit every supported size, and the
                                #   grid a browser window is given fits the window
    barrel-roll.test.mjs        # Roll timing, invincibility, and cooldown
    combo.test.mjs              # Combo chaining, decay, and the HUD counter
    sound.test.mjs              # Sound cues and the browser synthesizer
    hud-row.test.mjs            # The HUD row the counter, label and banner share
    warp.test.mjs               # The difficulty step and the transition it shows
    asteroid-field.test.mjs     # The section where the walls come down, and the rocks
    boss.test.mjs               # The encounter: its clock, its return fire, and its block
    powerups.test.mjs           # Drops, drift, pickups, rapid fire, slow motion
    leaderboard.test.mjs        # The top ten, the name that earns a row, and the table
    replay-ghost.test.mjs       # The path a run records and the ghost the next one races
    performance-mode.test.mjs   # The detail ladder, and what a window of frames argues for
    browser-shell.test.mjs      # Colour scheme, touch controls, the favicon, and
                                #   the calls the page wiring makes into the logic
    browser-wiring.test.mjs     # The page wiring itself, run against a stub DOM:
                                #   the frame loop, the devices, and handleResize
    versus.test.mjs             # The split screen: two seats, two streams, two halves
    docs-site.test.mjs          # The site's menu, palette, bar geometry and breakpoint
    page-style.test.mjs         # What the stylesheet resolver weighs, and the sheets it refuses
    probes.test.mjs             # The probe table against the probes themselves
    pulse-cannon.test.mjs       # Where shots go and what they register against
    repo-files.test.mjs         # The .gitignore un-ignore lines, against git's own answer
    parity.test.mjs             # Both builds agree
  docs/               # This project's documentation site
    index.html                  # Site home
    quickstart.html             # QUICKSTART.md as a page
    features.html               # What a run has in it
    getting-started.html        # Install and run, browser and terminal
    usage.html                  # Controls, gameplay, and the debug modes
    development.html            # Line endings, tests, and probes
    project-structure.html      # This page
    terminal-requirements.html  # What a terminal needs to draw the game
    how-it-works.html           # How both builds are put together
    cheatsheet.html             # CHEATSHEET.md as a page
    assets/
      style.css                 # The whole site, both colour schemes
      docs.js                   # The nav menu and its dropdowns
      icon.svg                  # The ship icon, as the site favicon
  hero.png            # Hero banner graphic
  icon.svg            # Ship icon, inlined into index.html as the favicon
  QUICKSTART.md       # The shortest path to a run, and the page made from it
  CHEATSHEET.md       # Every key and HUD field on one page
  DESIGN_LANGUAGE.md  # The site's look: colours, type, spacing, and layout
  .gitattributes      # Line endings: LF, in the index and the working tree
  .gitignore          # Ignore rules; un-ignores itself or no clone gets them
  .nojekyll           # Serves the branch as-is; without it GitHub runs Jekyll
  package.json        # CLI tool manifest and dependencies
  tsconfig.json       # TypeScript configuration