Files
joke-app/apps/web/src/games/clue/quick.tsx
EJClaw c9f81804cf 클루: 규칙·컴퓨터 상대·화면·테스트
- 규칙 모듈 packages/games/src/clue: 3~6명, 용의자 6·흉기 6·방 9, 봉투 3장, 나머지는 같은 장수로
  나누고 남는 카드는 공개(원작). 9개 방 + 복도를 거리 표로 단순화한 저택(비밀 통로 부엌↔서재,
  온실↔라운지), 주사위 2개 합만큼 이동해 닿는 방에 들어가거나 먼 방 쪽으로 걸어가기, 빠른 이동 옵션.
  추리 시 용의자 말·흉기 이동과 불려 온 사람의 제자리 추리, 다음 사람부터 반증(반증자가 직접 고름,
  보여 준 카드는 두 사람만), 고발(틀리면 탈락하되 반증은 계속, 모두 틀리면 무승부).
  카드 id(card-*)와 추리 이름을 나눠 view 누출 검사가 의미 있게, 이벤트에는 카드 없음.
  시간 초과는 차례를 통째로 자동 진행, 반증은 첫 카드 자동, 나가면 카드 공개.
- 컴퓨터 상대(bot.ts): 소거 노트(내 카드·공개·받은 카드 → 못 보여 준 사람·손패 수 → "셋 중 하나"
  제약·틀린 고발), 단계가 높을수록 깊게, 확실할 때만 고발, 모르는 카드로 추리, 모르는 방으로 이동.
- 화면 apps/web/src/games/clue: 저택 지도(말·흉기·거리·통로), 주사위·방 고르기, 추리/고발 칩,
  반증 카드 고르기, 내 카드·공개 카드, 추리 노트(localStorage, 방 코드+게임 번호), 추리 기록.
- 등록(GAMES, 카탈로그, BOT_GAMES, BOT_STRATEGIES, 화면 레지스트리, 아이콘·분류), 문서
  docs/games/clue.md, E2E 계획(PC 1 + 휴대폰 2, 끝까지).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 03:09:33 +09:00

89 lines
3.7 KiB
TypeScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/** 클루 30초 규칙 요약 (docs/07 §5). */
import type { QuickCard } from '../types';
function Mini({ label, icon, hidden, tone }: { label: string; icon: string; hidden?: boolean; tone?: 'shown' | 'out' }) {
return (
<div
style={{
width: 62,
height: 80,
borderRadius: 9,
border: `2px solid ${tone === 'shown' ? '#2563eb' : '#b79c6b'}`,
background: hidden ? 'repeating-linear-gradient(45deg, #7c2d12 0 6px, #9a3412 6px 12px)' : 'linear-gradient(160deg, #fffaf0, #f1e6cf)',
color: '#2b2118',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
fontWeight: 800,
fontSize: 12,
position: 'relative',
boxShadow: tone === 'shown' ? '0 0 0 3px rgba(37,99,235,.35)' : '0 2px 0 rgba(0,0,0,.25)',
}}
>
{hidden ? <span style={{ fontSize: 26, color: '#fff' }}>?</span> : <span style={{ fontSize: 24 }}>{icon}</span>}
{!hidden && <span>{label}</span>}
{tone === 'out' && <span style={{ position: 'absolute', top: -8, right: -6, color: '#dc2626', fontSize: 22, fontWeight: 900 }}>✗</span>}
</div>
);
}
const row = { display: 'flex', gap: 8, alignItems: 'center', justifyContent: 'center' } as const;
export const quickStart: QuickCard[] = [
{
pic: (
<div style={{ ...row, flexDirection: 'column' }}>
<span style={{ fontSize: 34 }} aria-hidden>
📁
</span>
<div style={row}>
<Mini label="범인" icon="" hidden />
<Mini label="흉기" icon="" hidden />
<Mini label="장소" icon="" hidden />
</div>
</div>
),
alt: '사건 봉투 아래에 뒤집힌 카드 세 장(범인, 흉기, 장소)이 있어요',
title: '봉투 속 세 장을 맞혀요',
text: '범인·흉기·장소 카드가 한 장씩 사건 봉투에 숨어 있어요. 나머지 카드는 모두 나눠 가져요. 내 카드는 정답이 아니에요.',
},
{
pic: (
<div style={row}>
<div style={{ border: '2px solid #15803d', borderRadius: 10, padding: '8px 10px', background: '#dcfce7', color: '#14532d', fontWeight: 800, textAlign: 'center' }}>
<div style={{ fontSize: 26 }}>🖋️</div>
서재
<div style={{ marginTop: 4 }}>
<span style={{ display: 'inline-block', width: 22, height: 22, borderRadius: '50%', background: '#dc2626', color: '#fff', fontSize: 11, lineHeight: '22px' }}>스</span>
</div>
</div>
<span style={{ fontSize: 30 }} aria-hidden>
🎲
</span>
<span style={{ fontWeight: 800, fontSize: 15 }}>“플럼 교수가, 밧줄로, 서재에서!”</span>
</div>
),
alt: '주사위를 굴려 서재에 들어간 빨간 말과 추리하는 말풍선이 있어요',
title: '방에 들어가 추리해요',
text: '주사위로 복도를 걸어 방에 들어가면, 그 방에서 "범인·흉기·이 방"을 말해 추리해요. 모서리 방은 비밀 통로로 건너가요.',
},
{
pic: (
<div style={row}>
<Mini label="밧줄" icon="🪢" tone="shown" />
<span style={{ fontSize: 26 }} aria-hidden>
➜
</span>
<Mini label="밧줄" icon="🪢" tone="out" />
<span style={{ fontSize: 30 }} aria-hidden>
⚖️
</span>
</div>
),
alt: '다른 사람이 몰래 보여 준 밧줄 카드에 노트에서 ✗ 표시를 하고, 저울(고발)이 있어요',
title: '지우고, 고발해요',
text: '다음 사람부터 셋 중 가진 카드 한 장을 나에게만 보여 줘요. 노트에서 지워 가다 확신이 서면 고발! 틀리면 탈락이에요.',
},
];