- game/round.ts: GameRound contract (start/submitAnswer/reveal/score) + RoundContext + RoomGameController (decouples room from engine) - game/registry.ts: register/createRound — adding a mode = one registerRound - game/engine.ts: server-authoritative orchestration. Per round: start → broadcast round:start → wait (timer OR all eligible voted) → reveal → apply score deltas → score:update; then game:end. DJ counts as eligible voter; round ends on first condition met. - handlers: game:start (host-only, validates rounds/modes) + round:vote wired to the engine - shared: add game:start client event - engine.test.ts: covers both end conditions + voteAck (bun test) - turbo/root: add test task Roadmap V1 step 3. No UI yet — concrete quiz mode + client come in step 4. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
27 lines
528 B
JSON
27 lines
528 B
JSON
{
|
|
"name": "nerdware",
|
|
"version": "0.0.1",
|
|
"private": true,
|
|
"scripts": {
|
|
"build": "turbo build",
|
|
"dev": "turbo dev",
|
|
"lint": "turbo lint",
|
|
"format": "turbo format",
|
|
"typecheck": "turbo typecheck",
|
|
"test": "turbo test"
|
|
},
|
|
"devDependencies": {
|
|
"prettier": "^3.8.3",
|
|
"prettier-plugin-tailwindcss": "^0.8.0",
|
|
"turbo": "^2.9.15",
|
|
"typescript": "~6"
|
|
},
|
|
"packageManager": "bun@1.3.14",
|
|
"engines": {
|
|
"node": ">=20"
|
|
},
|
|
"workspaces": [
|
|
"apps/*",
|
|
"packages/*"
|
|
]
|
|
}
|