nerdware/apps/server
AyoubBenziza 9ed3b8a4cb feat(server): generic game engine — GameRound interface + orchestration loop
- 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>
2026-06-08 15:29:49 +02:00
..
src feat(server): generic game engine — GameRound interface + orchestration loop 2026-06-08 15:29:49 +02:00
.env.example feat(shared,server): scaffold @nerdware/shared types + Fastify/Socket.IO server 2026-06-08 14:55:52 +02:00
eslint.config.js feat(shared,server): scaffold @nerdware/shared types + Fastify/Socket.IO server 2026-06-08 14:55:52 +02:00
package.json feat(server): generic game engine — GameRound interface + orchestration loop 2026-06-08 15:29:49 +02:00
tsconfig.json feat(shared,server): scaffold @nerdware/shared types + Fastify/Socket.IO server 2026-06-08 14:55:52 +02:00