- 보석 상인 → 스플렌더, 벽 쌓기 길찾기 → 쿼리도, 숫자 타일 → 루미큐브, 주사위 땅따먹기 → 부루마불 - deploy/docker-compose.proxy.yml: Caddy 없이 앱만(.5:2970), HTTPS·헤더는 NPMplus - deploy/npmplus-advanced.conf: Caddyfile과 같은 보안 헤더 - 문서: 2026-10-06 결정, 배포 7절 (e2e 구십구 0 카드 방향 버튼 반영 포함) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
65 lines
3.3 KiB
TypeScript
65 lines
3.3 KiB
TypeScript
/** 쿼리도 30초 규칙 요약 (docs/07 §5). A small corner of the board, drawn inline. */
|
|
import type { QuickCard } from '../types';
|
|
|
|
type Pawn = [number, number, string];
|
|
/** Wall in grooves: [x, y, 'h' | 'v'] — 'h' lies under row y spanning columns x..x+1, 'v' right of column x spanning rows y..y+1. */
|
|
type W = [number, number, 'h' | 'v'];
|
|
|
|
function MiniBoard({ n = 5, pawns, walls = [], path = [], ghost = [], band = '#dc2626', bad = false }: { n?: number; pawns: Pawn[]; walls?: W[]; path?: [number, number][]; ghost?: W[]; band?: string; bad?: boolean }) {
|
|
const s = 150 / n;
|
|
const g = 5;
|
|
const cell = (i: number) => 10 + i * s;
|
|
const wallRect = ([x, y, o]: W) =>
|
|
o === 'h' ? { x: cell(x) + 1, y: cell(y + 1) - g / 2 - 1.5, width: 2 * s - 6, height: g + 3 } : { x: cell(x + 1) - g / 2 - 1.5, y: cell(y) + 1, width: g + 3, height: 2 * s - 6 };
|
|
return (
|
|
<svg viewBox="0 0 170 170" width={170} height={170} aria-hidden>
|
|
<rect x={0} y={0} width={170} height={170} rx={10} fill="#7c4a24" />
|
|
<rect x={10} y={2} width={n * s - g} height={5} rx={2} fill={band} />
|
|
{Array.from({ length: n * n }, (_, k) => (
|
|
<rect key={k} x={cell(k % n)} y={cell(Math.floor(k / n))} width={s - g} height={s - g} rx={3} fill="#e9c98f" />
|
|
))}
|
|
{path.length > 1 && (
|
|
<polyline points={path.map(([x, y]) => `${cell(x) + (s - g) / 2},${cell(y) + (s - g) / 2}`).join(' ')} fill="none" stroke="#2563eb" strokeWidth={3} strokeDasharray="5 4" strokeLinecap="round" />
|
|
)}
|
|
{walls.map((w, k) => (
|
|
<rect key={`w${k}`} {...wallRect(w)} rx={2} fill="#3b2410" />
|
|
))}
|
|
{ghost.map((w, k) => (
|
|
<rect key={`g${k}`} {...wallRect(w)} rx={2} fill={bad ? '#dc2626' : '#3b2410'} opacity={0.55} />
|
|
))}
|
|
{pawns.map(([x, y, c], k) => (
|
|
<circle key={`p${k}`} cx={cell(x) + (s - g) / 2} cy={cell(y) + (s - g) / 2} r={(s - g) / 2 - 2} fill={c} stroke="#fff" strokeWidth={2} />
|
|
))}
|
|
</svg>
|
|
);
|
|
}
|
|
|
|
export const quickStart: QuickCard[] = [
|
|
{
|
|
pic: <MiniBoard pawns={[[2, 4, '#dc2626']]} path={[[2, 4], [2, 3], [2, 2], [2, 1], [2, 0]]} />,
|
|
alt: '빨간 말이 점선을 따라 맨 위 빨간 띠 줄로 올라가요',
|
|
title: '맨 위 줄까지 가면 이겨요',
|
|
text: '내 말을 반대편 끝줄(내 색 띠)까지 먼저 보내면 이겨요. 내 차례에는 말을 한 칸 움직이거나 벽을 하나 세워요.',
|
|
},
|
|
{
|
|
pic: <MiniBoard pawns={[[2, 4, '#dc2626']]} walls={[[1, 2, 'h']]} path={[[2, 4], [2, 3], [3, 3], [3, 2], [3, 1], [3, 0]]} />,
|
|
alt: '두 칸 길이의 벽이 빨간 말 앞을 막아서 옆으로 돌아가야 해요',
|
|
title: '벽으로 길을 막아요',
|
|
text: '벽은 칸 2개 길이로 칸 사이에 세워요. 상대 앞에 세우면 상대가 빙 돌아가야 해요. 세운 벽은 치울 수 없어요.',
|
|
},
|
|
{
|
|
pic: (
|
|
<MiniBoard
|
|
n={6}
|
|
pawns={[[2, 4, '#dc2626']]}
|
|
walls={[[0, 1, 'h'], [2, 1, 'h']]}
|
|
ghost={[[4, 1, 'h']]}
|
|
bad
|
|
/>
|
|
),
|
|
alt: '벽 사이 마지막 틈을 막으려는 벽이 빨갛게 보여요. 길을 완전히 막을 수는 없어요',
|
|
title: '길을 다 막으면 안 돼요',
|
|
text: '누구든 목표까지 갈 길이 하나는 남아 있어야 해요. 세울 수 없는 자리는 빨갛게 보여요. 벽은 아껴 두었다 결정적일 때 써요.',
|
|
},
|
|
];
|