M9: 초보자 도움 틀 — 30초 규칙 요약 카드, 게임 중 [?] 지금 할 수 있는 것, 오목 내용
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
47
apps/web/src/games/omok/quick.tsx
Normal file
47
apps/web/src/games/omok/quick.tsx
Normal file
@@ -0,0 +1,47 @@
|
||||
/** 오목 30초 규칙 요약 (docs/07 §5). */
|
||||
import type { QuickCard } from '../types';
|
||||
|
||||
function MiniBoard({ stones, marks = [] }: { stones: [number, number, 'b' | 'w'][]; marks?: [number, number][] }) {
|
||||
const n = 7;
|
||||
return (
|
||||
<svg viewBox="-0.7 -0.7 7.4 7.4" width={170} height={170} aria-hidden>
|
||||
<rect x={-0.7} y={-0.7} width={7.4} height={7.4} rx={0.4} fill="#e9c27a" />
|
||||
{Array.from({ length: n }, (_, i) => (
|
||||
<g key={i} stroke="#7a5a2a" strokeWidth={0.05}>
|
||||
<line x1={0} y1={i} x2={n - 1} y2={i} />
|
||||
<line x1={i} y1={0} x2={i} y2={n - 1} />
|
||||
</g>
|
||||
))}
|
||||
{stones.map(([x, y, c]) => (
|
||||
<circle key={`${x}-${y}`} cx={x} cy={y} r={0.44} fill={c === 'b' ? '#151515' : '#fbfbf8'} stroke={c === 'b' ? '#000' : '#666'} strokeWidth={0.06} />
|
||||
))}
|
||||
{marks.map(([x, y]) => (
|
||||
<g key={`m${x}-${y}`} stroke="#b91c1c" strokeWidth={0.12}>
|
||||
<line x1={x - 0.25} y1={y - 0.25} x2={x + 0.25} y2={y + 0.25} />
|
||||
<line x1={x + 0.25} y1={y - 0.25} x2={x - 0.25} y2={y + 0.25} />
|
||||
</g>
|
||||
))}
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
export const quickStart: QuickCard[] = [
|
||||
{
|
||||
pic: <MiniBoard stones={[[3, 3, 'b'], [4, 3, 'w'], [3, 4, 'b'], [2, 2, 'w']]} />,
|
||||
alt: '바둑판 위에 검은 돌과 흰 돌이 번갈아 놓여 있어요',
|
||||
title: '번갈아 한 개씩 놓아요',
|
||||
text: '흑이 먼저 시작해요. 내 차례에 빈 곳(줄이 만나는 점)을 누르면 돌이 놓여요.',
|
||||
},
|
||||
{
|
||||
pic: <MiniBoard stones={[[1, 5, 'b'], [2, 4, 'b'], [3, 3, 'b'], [4, 2, 'b'], [5, 1, 'b'], [2, 3, 'w'], [4, 4, 'w']]} />,
|
||||
alt: '검은 돌 5개가 대각선으로 이어져 있어요',
|
||||
title: '5개를 이으면 이겨요',
|
||||
text: '가로·세로·대각선 어느 쪽이든 내 돌 5개를 먼저 한 줄로 이으면 이겨요.',
|
||||
},
|
||||
{
|
||||
pic: <MiniBoard stones={[[2, 3, 'b'], [3, 3, 'b'], [4, 4, 'b'], [4, 5, 'b'], [1, 1, 'w'], [5, 1, 'w']]} marks={[[4, 3]]} />,
|
||||
alt: '빨간 ✕ 표시가 있는 자리는 둘 수 없어요',
|
||||
title: '✕ 자리는 못 둬요',
|
||||
text: '규칙에 따라 둘 수 없는 자리(금수)는 ✕로 보여 줘요. 상대가 4개를 이으면 꼭 막아요.',
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user