Cinema v2 for developers. Movies are features, trailers are demos, box office is adoption, rotten tomatoes are user reviews.
  • JavaScript 100%
Find a file
2026-06-30 11:15:04 +00:00
node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709 test: add e2e tests 2026-06-28 11:11:07 +00:00
src feat(#1): cinema v2 engine — movies, theaters, showings, reviews, ASCII cinema 2026-06-15 23:08:05 +00:00
tests fix: e2e tests now use CommonJS require for node --test compatibility 2026-06-30 11:15:01 +00:00
package.json feat(#1): cinema v2 engine — movies, theaters, showings, reviews, ASCII cinema 2026-06-15 23:08:05 +00:00
README.md feat(#1): cinema v2 engine — movies, theaters, showings, reviews, ASCII cinema 2026-06-15 23:08:05 +00:00

code-cinema-v2

Cinema v2 for developers. Movies are features, trailers are demos, box office is adoption, rotten tomatoes are user reviews.

Usage

const { Cinema, GENRES } = require('./src/cinema');

const cinema = new Cinema('DevFlix Multiplex');
cinema.setProjectionist('Operator');

// Register movies (features)
cinema.registerMovie('Auth Refactor', GENRES.DRAMA, { quality: 80 });
cinema.registerMovie('3AM Hotfix', GENRES.ACTION, { quality: 75 });

// Admit viewers
cinema.admitMoviegoer('Alice', 'vip');
cinema.admitMoviegoer('Bob', 'general');

// Sell tickets and show
cinema.sellTicket('Alice', 'staging');
cinema.sellTicket('Bob', 'staging');
cinema.showMovie('staging', '3AM Hotfix');
cinema.endShow('staging');

console.log(cinema.cinemaView());
console.log(cinema.report());

Genres

  • Drama (Auth Refactor) — Complex, emotional, long arcs
  • Action (Hotfix) — Explosions, fast resolution
  • Comedy (Rubber Duck Debugging) — Bug was a typo
  • Horror (Legacy Code) — Nobody survives
  • Sci-Fi (Future Architecture) — Ambitious, uncertain
  • Documentary (Post-mortem) — What went wrong
  • Thriller (Security Incident) — Zero-day edge of seat
  • Romance (New Framework Love) — Perfect... until it isn't

Theaters

  • Dev Theater — 20 seats, $5, small screen
  • Staging Cinema — 50 seats, $10, medium screen
  • Production Megaplex — 200 seats, $20, IMAX