Repository navigation
Games stage 1: settings, round engine, question kit, awards (MAD-783) - #59
Merged
Merged
Conversation
Room games settings with levels and a Start rounds permission (MAD-784), the games round engine with beat-timed rounds, fuzzy answers, scores and answer hiding (MAD-785), the pure quiz question kit with plausible wrong answers (MAD-786), and night awards (MAD-787). ADR 0015. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Games section in room settings with levels, an Adjust disclosure and a per-device mute (MAD-784); the phone answer sheet and big-screen round overlay, Start a round, and lyrics and liner notes held back while a round asks about them (MAD-785); night awards on the crown moment and in recaps, with each award's song (MAD-787). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stage 1 of Phase 10, music party games (MAD-783). This adds the foundation every later game plugs into. Design notes are in
docs/adr/0015-party-games.md. The issue said ADR 0014, but backups already has that number.MAD-784: Games setting
rooms.Settings.Games(settings version 2), off by default. The levels areoff,recap,ambient,roundsandgamenight, and each level sets the defaults for the per-game switches, frequency, scores, guests, TV only and breaks per hour.RoomGamesChange), so sending only a level resets the fine controls.startRoundspermission (Everyone or Owner, Owner by default).MAD-785: Round engine
gamespackage. One round at a time per room, in memory: announce → open → reveal → done. Rounds start from the frequency setting or from Start a round in the room menu.POST /rooms/{id}/games/rounds/{roundId}/answerstakes choice, number or free text. Free text matches fuzzily (case, punctuation, accents, "the", bracketed asides, small typos). Answers can change until the round closes and are scored by when the server received them.game_roundsandgame_answers, and tonight's scores honour the off / private / board setting.game.roundandgame.scoresevents. A hidden song becomes a "Mystery song" for everyone but the speaker (matched bydeviceon the socket). Lyrics, liner notes and artwork are refused withhidden_for_roundwhile hidden.MAD-786: Question kit
quizpackage, pure. It takes song facts (liner notes, lyrics, beat map, music graph) and returns year, cover, credit, sample and next-line questions.Readylists the games a song can carry. Facts are gathered a few songs ahead in rooms that play games.coverOf,samplesandsampledBy.MAD-787: Recap awards
awardspackage, pure, with the 11 awards from the issue. At most six per night, at most two per person, ties skipped, and autopilot never wins.Worth reviewing
httpapi.Private→httpapi.RoomVisibilityPrivate). Only tests used the old names.Testing
go test -race ./...andgolangci-lintare clean. New tests cover the settings levels, the quiz fixtures, awards, the engine lifecycle and scoring, and an end-to-end games API test.pnpm typecheck,pnpm lint,pnpm testandpnpm buildare clean, with new tests inlib/games.test.ts.🤖 Generated with Claude Code