M8: 파티 게임 3종 합치기, 그림 맞히기도 게임 중 방 채팅 닫기

- 도블·그림 맞히기·마피아 브랜치 병합 (validate ctx 타입은 ValidateContext로 통일)
- 그림 맞히기에 ownChat 적용: 출제자 채팅 금지(§4), 정답이 방 채팅으로 새는 문제 차단
- '곧 나와요' 목록이 비면 숨김, 로드맵 M8 결과 기록

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
EJClaw
2026-10-06 00:58:59 +09:00
parent 9bfb30a5e7
commit 6f462b8cb1
3 changed files with 11 additions and 1 deletions

View File

@@ -874,7 +874,7 @@ function GuessPanel({ v, me, players, act, pending }: { v: CatchmindView; me: st
}, [lastId, v.chat, me]); }, [lastId, v.chat, me]);
useEffect(() => () => void (closeTimer.current && clearTimeout(closeTimer.current)), []); useEffect(() => () => void (closeTimer.current && clearTimeout(closeTimer.current)), []);
const enabled = v.canGuess || v.canChat; const enabled = v.canGuess || v.canChat;
// Enter anywhere focuses this box (not the room chat, so answers don't end up in the open room chat). // Enter anywhere focuses this box (the room chat is closed during the game: ownChat).
useEffect(() => { useEffect(() => {
if (!enabled) return; if (!enabled) return;
const onKey = (e: KeyboardEvent) => { const onKey = (e: KeyboardEvent) => {
@@ -1239,6 +1239,7 @@ const ui: GameUI<CatchmindView, CatchmindOptions> = {
Options, Options,
optionsSummary, optionsSummary,
Rules, Rules,
ownChat: true,
}; };
export default ui; export default ui;

View File

@@ -71,6 +71,13 @@
## M8. 파티 게임 ## M8. 파티 게임
- 도블, 그림 맞히기(붓질 스트리밍), 마피아(채팅 채널). - 도블, 그림 맞히기(붓질 스트리밍), 마피아(채팅 채널).
- **진행 결과(2026-10-06)**: 세 게임 규칙 + 화면 완료. 규칙 테스트 도블 47(+방 단위 4·그림 1)·그림 맞히기 34(+방 단위 4)·마피아 43(+방 단위 1),
게임마다 무작위 플레이 1,000판(구성물·점수 보존, 비공개 정보 유출 없음, 시간 초과 행동 합법).
엔진 선택 훅 추가(기존 게임 영향 없음): `validate`의 `ctx.now`(채팅·추측 속도 제한), 붓질 스트리밍용 `isStreamAction`·`syncView`
(그림 획은 view 재계산 없이 `stream` 메시지로 중계, 1초마다 묶어 저장, 재접속 시 그림 전체 전송), `disconnectGraceMs`,
`ownChat`(게임 진행 중 방 채팅·빠른 반응을 닫음 — 마피아의 밤 대화, 그림 맞히기의 정답이 방 채팅으로 새지 않게).
E2E: 도블 탑 쌓기 한 판(정답 53번·오답 잠금), 그림 맞히기 두 턴(실제 마우스 획 전달·오답·아까워요·정답) → 결과,
마피아 4인(PC 방장 + 휴대폰 3명) 밤 행동 → 아침 발표 → 투표·반론·찬반 → 시민 팀 승리(마피아·죽은 사람 채팅이 다른 화면에 안 보임).
## M9. 다듬기 ## M9. 다듬기
- PWA(홈 화면 추가, 오프라인 안내), 게임 기록 다시 보기, 게임별 튜토리얼 강화. - PWA(홈 화면 추가, 오프라인 안내), 게임 기록 다시 보기, 게임별 튜토리얼 강화.

View File

@@ -548,6 +548,8 @@ export const catchmind: GameDefinition<S, A, CatchmindView, CatchmindOptions> =
defaultOptions: catchmindOptionsSchema.parse({}), defaultOptions: catchmindOptionsSchema.parse({}),
optionsSchema: catchmindOptionsSchema as unknown as GameDefinition<S, A, CatchmindView, CatchmindOptions>['optionsSchema'], optionsSchema: catchmindOptionsSchema as unknown as GameDefinition<S, A, CatchmindView, CatchmindOptions>['optionsSchema'],
actionSchema: catchmindActionSchema as unknown as GameDefinition<S, A, CatchmindView, CatchmindOptions>['actionSchema'], actionSchema: catchmindActionSchema as unknown as GameDefinition<S, A, CatchmindView, CatchmindOptions>['actionSchema'],
/** Guesses and talk go through the game's own filtered chat (§4·§7); the open room chat would leak answers. */
ownChat: true,
playerCountError(options, count) { playerCountError(options, count) {
const have = buildPool(options).length; const have = buildPool(options).length;