방 설정 "다음 문제까지"(5/10/15/30초, 기본 5초)와 "다음문제인원(이상)" 투표: 정답 공개 시간을 방마다 고르고, 공개 중 ⏭ 다음 문제(Ctrl+K) 표가 기준 이상이면 바로 넘어감(마지막 문제는 결과로). 공개 화면에 남은 초, 방 카드 요약에 '공개 N초', 관리자 기본값·잠금

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
EJClaw
2026-10-18 23:35:33 +09:00
parent c81b6b8c9a
commit a1507e5b95
12 changed files with 146 additions and 25 deletions

View File

@@ -29,7 +29,7 @@ export const ClientMessage = z.discriminatedUnion('t', [
/** Playback report for question `n` (docs/12 Q1): ready = buffered at the position, blocked = no sound, stall = buffering, clipEnd, error = player error code. */
z.object({ t: z.literal('audio'), n: z.number().int().min(1), ev: z.enum(['ready', 'blocked', 'stall', 'clipEnd', 'error']), code: z.number().int().optional() }),
/** Vote toggles (docs/05 스킵·힌트, docs/12 Q3·Q4). */
z.object({ t: z.literal('vote'), kind: z.enum(['skip', 'hint', 'replay']) }),
z.object({ t: z.literal('vote'), kind: z.enum(['skip', 'hint', 'replay', 'next']) }),
z.object({ t: z.literal('typing'), on: z.boolean() }),
/** Host game controls: pause/resume, end now, 이어풀기, 다시 하기 (back to the waiting room). */
z.object({ t: z.literal('game'), action: z.enum(['pause', 'resume', 'end', 'continue', 'again']) }),
@@ -128,8 +128,9 @@ export interface GameView {
/** 자동 공개 at this many seconds (null = none / 직접선택). */
hintAtSec: number | null;
lyrics: string[] | null;
votes: { skip: string[]; hint: string[]; replay: string[] };
need: { skip: number | null; hint: number | null; replay: number | null };
/** next = 바로 다음 문제, only during the reveal. */
votes: { skip: string[]; hint: string[]; replay: string[]; next: string[] };
need: { skip: number | null; hint: number | null; replay: number | null; next: number | null };
scores: GameScore[];
/** Questions of this game so far, newest last; during reveal the last one is the current question. */
history: GameHistoryItem[];