A browser-based, client-only implementation of Roll Through the Ages, built with React + TypeScript + Redux.
This repo includes:
- A rules engine (
src/game/engine) for production, disasters, build/development, discard, scoring - A playable UI (
src/App.tsx+ components) - Bot players (heuristic + lookahead)
- Headless automation scripts for bot evaluation/tournaments/beam search
- Guided tutorial mode (single-game, step-by-step)
- GitHub Pages: https://ggulati.github.io/RollThroughAges/
- React 19
- TypeScript
- Redux Toolkit
- Vite
- Vitest + Testing Library
- ESLint + Prettier
- Playwright CLI (manual smoke/e2e checks)
src/game/: game types, definitions, and shared game logicsrc/game/engine/: pure engine modules (*Engine.ts)src/game/bot/: bot implementations and shared bot infrastructuresrc/game/automation/: headless game/evaluation helperssrc/store/: Redux slice + selectorssrc/__tests__/: engine/store/integration/bot testsscripts/: bot eval/tournament/beam-search scriptsplanning/: staged implementation docs and plansoutput/: generated artifacts (bot evals, tournaments, Playwright captures)
- Node.js 20+
- npm 10+
npm install
npm run devOpen the local URL Vite prints (typically http://127.0.0.1:5173).
npm run dev # Start dev server
npm run build # Production build (dist/)
npm run preview # Preview build
npm run typecheck # TypeScript checks
npm run lint # ESLint
npm run lint:strict # ESLint with zero warnings allowed
npm run format # Prettier check
npm run format:fix # Prettier write
npm test # Vitest run once
npm run test:watch # Vitest watch modeUse tsx to run scripts in scripts/.
Examples:
npx tsx scripts/bot_evals.ts --help
npx tsx scripts/bot_tournament.ts --help
npx tsx scripts/bot_beam_search.ts --helpThese scripts write result artifacts to output/.
This repository is configured for AI-assisted coding with AGENTS.md
Planning docs in planning/ are the source of truth when behavior conflicts arise.
