/** 쿼리도 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 ( {Array.from({ length: n * n }, (_, k) => ( ))} {path.length > 1 && ( `${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) => ( ))} {ghost.map((w, k) => ( ))} {pawns.map(([x, y, c], k) => ( ))} ); } export const quickStart: QuickCard[] = [ { pic: , alt: '빨간 말이 점선을 따라 맨 위 빨간 띠 줄로 올라가요', title: '맨 위 줄까지 가면 이겨요', text: '내 말을 반대편 끝줄(내 색 띠)까지 먼저 보내면 이겨요. 내 차례에는 말을 한 칸 움직이거나 벽을 하나 세워요.', }, { pic: , alt: '두 칸 길이의 벽이 빨간 말 앞을 막아서 옆으로 돌아가야 해요', title: '벽으로 길을 막아요', text: '벽은 칸 2개 길이로 칸 사이에 세워요. 상대 앞에 세우면 상대가 빙 돌아가야 해요. 세운 벽은 치울 수 없어요.', }, { pic: ( ), alt: '벽 사이 마지막 틈을 막으려는 벽이 빨갛게 보여요. 길을 완전히 막을 수는 없어요', title: '길을 다 막으면 안 돼요', text: '누구든 목표까지 갈 길이 하나는 남아 있어야 해요. 세울 수 없는 자리는 빨갛게 보여요. 벽은 아껴 두었다 결정적일 때 써요.', }, ];