diff --git a/apps/web/src/components/cards/HwatuCard.tsx b/apps/web/src/components/cards/HwatuCard.tsx index 592bd43..611436d 100644 --- a/apps/web/src/components/cards/HwatuCard.tsx +++ b/apps/web/src/components/cards/HwatuCard.tsx @@ -90,6 +90,7 @@ export function HwatuCard({ showMonth = true, monthStyle = 'badge', onClick, + disabled, className, style, }: { @@ -105,6 +106,8 @@ export function HwatuCard({ /** 'badge': small dark circle top-right. 'corner': big white outlined number bottom-left (섯다). */ monthStyle?: 'badge' | 'corner'; onClick?: () => void; + /** Keeps the card a (disabled) button while it can't be clicked, so switching on/off doesn't remount it (no replayed deal animation). */ + disabled?: boolean; className?: string; style?: CSSProperties; }) { @@ -122,7 +125,7 @@ export function HwatuCard({ border: 0, borderRadius: radius, background: 'none', - cursor: onClick ? 'pointer' : 'default', + cursor: onClick && !disabled ? 'pointer' : 'default', opacity: dimmed ? 0.45 : 1, transform: selected ? `translateY(${-Math.round(w * 0.2)}px)` : undefined, transition: 'transform 0.12s ease', @@ -145,8 +148,9 @@ export function HwatuCard({ diff --git a/apps/web/src/games/seotda/board.tsx b/apps/web/src/games/seotda/board.tsx index fab6880..520c42f 100644 --- a/apps/web/src/games/seotda/board.tsx +++ b/apps/web/src/games/seotda/board.tsx @@ -1,6 +1,7 @@ /** - * 섯다 판 화면 (docs/games/seotda.md §9), 한게임 섯다처럼: 초록 테이블 둘레에 자리, 가운데 판돈, 아래쪽 내 자리에 큰 패와 - * 족보 이름, 그 밑에 숫자 키가 붙은 베팅 버튼. 돈은 이 방 안에서만 쓰는 놀이용 원(§12). + * 섯다 판 화면 (docs/games/seotda.md §9), 한게임 섯다처럼: 테이블 둘레에 다른 사람 자리(패 위, 이름·돈 아래), 가운데 판돈, + * 테이블 아래 금색 판에 왼쪽부터 족보판 · 내 얼굴과 시계 · 내 패와 지금 족보 · 숫자 키가 붙은 베팅 버튼(콜 다이 / 삥 체크 / + * 따당 / 하프 두 줄). 돈은 이 방 안에서만 쓰는 놀이용 원(§12). * Sound and motion follow view changes (anyone's bet, deal, reveal, payout), so other players' moves play too. */ import { useEffect, useLayoutEffect, useRef, useState, type CSSProperties, type ReactNode } from 'react'; @@ -14,6 +15,7 @@ import { haptic, sfx, sounds } from '../../lib/feedback'; import { usePhone } from '../../lib/media'; import type { BoardProps } from '../types'; import { fxMs } from '../../lib/motion'; +import { JokboBoard } from './jokbo'; export const BET_KO: Record = { check: '체크', ping: '삥', call: '콜', ddadang: '따당', quarter: '쿼터', half: '하프', full: '풀', die: '다이' }; /** Number keys like 한게임 섯다 (콜 7, 다이 8, 삥 4, 체크 5, 따당 1, 하프 0); 쿼터 2 and 풀 9 are ours. */ @@ -84,8 +86,8 @@ function bannerOf(v: SeotdaView): string | null { const isBig = (name: string) => /광땡|땡$|장땡/.test(name) && name !== '땡잡이'; const CSS = ` -.sd-wrap { width: 100%; max-width: 1060px; display: flex; flex-direction: column; gap: 10px; align-self: center; } -.sd-table { position: relative; width: 100%; aspect-ratio: 16 / 9.4; min-height: 470px; border-radius: 44px; border: 12px solid #5b3a1e; +.sd-wrap { width: 100%; max-width: 1060px; display: flex; flex-direction: column; gap: 10px; align-self: center; container: sd / inline-size; } +.sd-table { position: relative; width: 100%; aspect-ratio: 16 / 7.4; min-height: 380px; border-radius: 44px; border: 12px solid #5b3a1e; background: radial-gradient(ellipse at 50% 45%, #2f8a5c 0%, #1d6a44 55%, #134b30 100%); box-shadow: inset 0 0 0 3px rgba(255,255,255,.08), inset 0 0 60px rgba(0,0,0,.35), 0 8px 24px rgba(0,0,0,.3); } .sd-table::before { content: ''; position: absolute; inset: 14px; border-radius: 30px; border: 2px dashed rgba(255,255,255,.12); pointer-events: none; } .sd-seat { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); width: 156px; z-index: 2; @@ -117,23 +119,62 @@ const CSS = ` background: radial-gradient(circle at 35% 35%, #fff7c2, #f5b301 55%, #b45309); border: 2px solid #92400e; animation: sd-fly .55s cubic-bezier(.3,.7,.4,1) both; animation-delay: var(--d, 0ms); } @keyframes sd-fly { from { transform: translate(0, 0) scale(.9); opacity: 1; } 85% { opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(.7); opacity: 0; } } -.sd-me { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 2; display: flex; align-items: flex-end; gap: 14px; - background: rgba(10, 22, 16, .72); border: 2px solid rgba(255,255,255,.14); border-radius: 16px; padding: 8px 14px; color: #fff; max-width: 96%; } -.sd-me.turn { border-color: #fbbf24; box-shadow: 0 0 0 3px rgba(251,191,36,.35); } -.sd-me.win { border-color: #fde047; box-shadow: 0 0 0 3px rgba(253,224,71,.5), 0 0 22px rgba(253,224,71,.45); } -.sd-me .mine { display: flex; gap: 6px; align-items: flex-end; } -.sd-me .meta { display: flex; flex-direction: column; gap: 3px; min-width: 150px; } -.sd-myhand { font-size: 1.45rem; font-weight: 900; color: #fde047; text-shadow: 0 2px 4px rgba(0,0,0,.5); line-height: 1.15; } -.sd-bar { display: flex; gap: 12px; align-items: stretch; justify-content: center; flex-wrap: wrap; } -.sd-bets { display: grid; grid-template-columns: repeat(3, minmax(92px, 1fr)); gap: 8px; flex: 1; max-width: 560px; } -.sd-bet { position: relative; min-height: 58px; border: 0; border-radius: 12px; color: #fff; font-weight: 900; font-size: 1.15rem; cursor: pointer; - display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; box-shadow: inset 0 -3px 0 rgba(0,0,0,.25), 0 2px 4px rgba(0,0,0,.2); } -.sd-bet small { font-size: .78rem; font-weight: 700; opacity: .95; font-variant-numeric: tabular-nums; } -.sd-bet kbd { position: absolute; top: 4px; left: 6px; font: 700 .7rem/1 inherit; opacity: .8; background: rgba(0,0,0,.25); border-radius: 4px; padding: 2px 4px; } -.sd-bet:disabled { filter: grayscale(.85) brightness(.85); opacity: .45; cursor: default; box-shadow: none; } -.sd-bet:not(:disabled):hover { filter: brightness(1.1); } -.sd-bet:not(:disabled):active { transform: translateY(1px); } +.sd-dock { position: relative; display: flex; gap: 12px; align-items: stretch; padding: 10px 12px; border-radius: 16px; color: #3b2306; + background: linear-gradient(180deg, #f8e3a3 0%, #ecc768 55%, #d9a744 100%); border: 3px solid #8a5a1c; + box-shadow: inset 0 0 0 2px rgba(255,255,255,.35), 0 6px 16px rgba(0,0,0,.25); transition: box-shadow .2s, border-color .2s; } +.sd-dock.turn { border-color: #f59e0b; box-shadow: inset 0 0 0 2px rgba(255,255,255,.35), 0 0 0 4px rgba(245,158,11,.45), 0 6px 16px rgba(0,0,0,.25); } +.sd-dock.win { border-color: #fde047; box-shadow: inset 0 0 0 2px rgba(255,255,255,.35), 0 0 0 4px rgba(253,224,71,.6), 0 0 24px rgba(253,224,71,.5); } +.sd-jokbo { flex: 0 0 262px; display: flex; flex-direction: column; gap: 5px; background: rgba(74,44,10,.88); color: #fdf6e3; border-radius: 10px; padding: 6px 8px; } +.sd-jokbo h3 { margin: 0; font-size: .95rem; font-weight: 900; color: #fde68a; letter-spacing: .2em; } +.sd-jokbo ol { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; } +.sd-jokbo li button { width: 100%; text-align: left; border: 1px solid rgba(253,230,138,.25); border-radius: 4px; background: rgba(255,255,255,.08); color: inherit; + font: 700 .74rem/1.55 inherit; padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; } +.sd-jokbo li button.sel { border-color: #fde68a; } +.sd-jokbo li button.hit { background: #c4b5fd; color: #2e1065; border-color: #ede9fe; } +.sd-jokbo-desc { display: flex; gap: 6px; align-items: center; font-size: .78rem; line-height: 1.3; margin-top: auto; padding-top: 4px; border-top: 1px solid rgba(253,230,138,.25); } +.sd-jokbo-desc .pics { display: flex; gap: 2px; flex: none; } +.sd-jokbo-desc strong { color: #fde68a; } +.sd-prof { position: relative; flex: 0 0 104px; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; + background: rgba(255,255,255,.35); border-radius: 10px; padding: 8px 6px; } +.sd-prof .nm { font-size: .85rem; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } +.sd-prof .sd-money { color: #7c2d12; font-size: .95rem; } +.sd-prof .sd-delta.plus { color: #15803d; } .sd-prof .sd-delta.minus { color: #b91c1c; } +.sd-play { flex: 1; min-width: 0; display: flex; gap: 12px; align-items: stretch; } +.sd-handarea { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; + background: rgba(122,74,18,.18); border-radius: 10px; padding: 8px 6px; } +.sd-handarea .mine { display: flex; gap: 8px; align-items: flex-end; justify-content: center; } +.sd-handarea .under { display: flex; justify-content: center; } +.sd-handarea .hint { font-size: .8rem; text-align: center; opacity: .9; } +.sd-myhand { display: inline-block; font-size: 1.3rem; font-weight: 900; line-height: 1.2; padding: 1px 14px; border-radius: 999px; background: #3b2306; color: #fde047; } +.sd-myhand.big { background: linear-gradient(180deg, #fde047, #f59e0b); color: #422006; box-shadow: 0 0 0 2px #7c2d12; } +.sd-myhand.die { background: #7f1d1d; color: #fecaca; } +.sd-combos { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; } +.sd-combo { border: 0; border-radius: 999px; padding: 2px 10px; font: 800 .9rem/1.4 inherit; background: #3b2306; color: #fde68a; } +.sd-combo.best { background: linear-gradient(180deg, #fde047, #f59e0b); color: #422006; box-shadow: 0 0 0 2px #7c2d12; } +button.sd-combo { cursor: pointer; } +button.sd-combo[aria-pressed='true'] { outline: 3px solid #2563eb; outline-offset: 1px; } +.sd-actions { flex: 0 0 236px; display: flex; flex-direction: column; justify-content: center; gap: 6px; } +.sd-actions p { margin: 0; font-size: .86rem; line-height: 1.4; } +.sd-result { display: flex; flex-direction: column; gap: 2px; font-size: .86rem; line-height: 1.4; background: rgba(255,255,255,.55); border-radius: 10px; padding: 8px 10px; } +.sd-bets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(38px, 1fr); gap: 6px; } +.sd-bet { position: relative; border: 1px solid #a07a3c; border-radius: 8px; padding: 0 8px 0 30px; cursor: pointer; display: flex; align-items: center; gap: 4px; + background: linear-gradient(180deg, #fffbeb, #f3dfa8); color: #3b2306; font-weight: 900; font-size: 1.05rem; line-height: 1.1; + box-shadow: inset 0 -2px 0 rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.2); } +.sd-bet .lb { flex: 1; text-align: center; } +.sd-bet small { font-size: .72rem; font-weight: 800; color: var(--c); font-variant-numeric: tabular-nums; white-space: nowrap; } +.sd-bet kbd { position: absolute; left: 5px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; border-radius: 4px; display: flex; align-items: center; justify-content: center; + font: 800 .78rem/1 inherit; background: #e9d29a; color: #7a5520; border: 1px solid #c9a35a; } +.sd-bet.on { border-color: var(--c); box-shadow: inset 4px 0 0 var(--c), 0 0 0 1px var(--c), 0 2px 4px rgba(0,0,0,.25); } +.sd-bet.on .lb { color: var(--c); } +.sd-bet:disabled { opacity: .5; cursor: default; box-shadow: none; } +.sd-bet.on:hover { filter: brightness(1.06); } +.sd-bet.on:active { transform: translateY(1px); } .sd-help { margin: 0; text-align: center; min-height: 1.4em; } +@container sd (max-width: 899px) { + .sd-dock { flex-wrap: wrap; } + .sd-jokbo { order: 3; flex: 1 1 100%; } + .sd-jokbo ol { grid-auto-flow: row; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: none !important; } +} @media (max-width: 719px) { .sd-table { aspect-ratio: auto; min-height: 0; border-width: 7px; border-radius: 22px; padding: 10px 8px; display: flex; flex-direction: column; gap: 8px; } .sd-table::before { inset: 6px; border-radius: 16px; } @@ -146,22 +187,28 @@ const CSS = ` .sd-pile { height: 26px; } .sd-pile i { width: 20px; height: 20px; } .sd-banner { position: fixed; top: 38%; font-size: 2.2rem; } - .sd-me { position: relative; left: auto; bottom: auto; transform: none; max-width: none; justify-content: center; gap: 10px; padding: 8px; } - .sd-me .meta { min-width: 0; flex: 1; } - .sd-myhand { font-size: 1.15rem; } - .sd-bets { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; max-width: none; } - .sd-bet { min-height: 56px; font-size: 1.05rem; } + .sd-dock { padding: 8px; gap: 8px; } + .sd-prof { order: -1; flex: 1 1 100%; flex-direction: row; justify-content: flex-start; padding: 4px 8px; gap: 8px; } + .sd-prof .row { min-height: 0 !important; } + .sd-play { flex: 1 1 100%; flex-direction: column; gap: 8px; } + .sd-actions { flex: none; } + .sd-myhand { font-size: 1.1rem; } + .sd-bets { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 48px; } + .sd-bets .sd-gap { display: none; } + .sd-bet { justify-content: center; padding: 0 4px; flex-direction: column; gap: 0; } + .sd-bet .lb { flex: none; } .sd-bet kbd { display: none; } + .sd-jokbo ol { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: row; } } `; // ---------------------------------------------------------------- table positions -/** Seats other than mine around the table: from my left, over the top, to my right (PC). */ +/** Seats other than mine around the table (mine is the bar below it): from my left, over the top, to my right (PC). */ function seatPos(rel: number, others: number): { x: number; y: number } { const t = rel / (others + 1); - const ang = ((150 + t * 240) * Math.PI) / 180; - return { x: 50 + 41 * Math.cos(ang), y: 49 + 36 * Math.sin(ang) }; + const ang = ((160 + t * 220) * Math.PI) / 180; + return { x: 50 + 39 * Math.cos(ang), y: 52 + 33 * Math.sin(ang) }; } /** Pile of coins in the middle; more coins for a bigger 판돈 (up to 9). */ @@ -239,6 +286,7 @@ function Seat({ seat, view: v, players, me, deadline, pos, cardW, winner, setRef aria-label={`${u.nickname}, 보유 ${formatWon(seat.stack)}${seat.isDealer ? ', 선' : ''}${seat.folded ? ', 다이' : ''}${tags.length ? `, ${tags.map((t) => t[0]).join(', ')}` : ''}`} > +
@@ -262,7 +310,6 @@ function Seat({ seat, view: v, players, me, deadline, pos, cardW, winner, setRef )}
- {seat.handName &&
{seat.handName}
} {seat.handDelta !== null && seat.handDelta !== 0 && (
0 ? 'plus' : 'minus'}`}>{formatWonDelta(seat.handDelta)}
@@ -280,67 +327,6 @@ function Seat({ seat, view: v, players, me, deadline, pos, cardW, winner, setRef ); } -/** My place at the bottom of the table: big cards, 족보 name, money. */ -function MySeat({ seat, view: v, players, deadline, winner, setRef, phone }: { seat: SeotdaSeatView; view: SeotdaView; players: Record; deadline: number | null; winner: boolean; setRef: SeatProps['setRef']; phone: boolean }) { - const u = userOf(players, seat.id); - const cards = seat.cards; - const w = phone ? (cards.length > 2 ? 62 : 74) : cards.length > 2 ? 78 : 92; - const tag = `${v.handNo}-${v.rematchNo}`; - const h = v.myHand; - return ( -
setRef(seat.id, el)} className={`sd-me${seat.isTurn ? ' turn' : ''}${winner ? ' win' : ''}`} aria-label={`내 자리, 보유 ${formatWon(seat.stack)}`}> - -
- {cards.length === 0 && {seat.inHand ? '패를 기다리는 중' : '이번 판은 쉬어요'}} - {cards.map((c, i) => - isCard(c) ? ( - - ) : ( - - ), - )} -
-
-
- - {u.nickname} (나) - {seat.isDealer && ( - - 선 - - )} - {(seat.isTurn || seat.chosen === false || seat.opening === false || !!v.reveal?.mine) && } -
- - {formatWon(seat.stack)} - - {h && seat.inHand && !seat.folded && !seat.handName && ( - - {h.name} - - )} - {h && seat.inHand && !seat.folded && !seat.handName && v.options.hints && {h.hint}} - {seat.folded && 다이했어요. 내 패는 나만 볼 수 있어요.} - {seat.handName &&
{seat.handName}
} - {seat.handDelta !== null && seat.handDelta !== 0 && ( -
0 ? 'plus' : 'minus'}`} style={{ textAlign: 'left', fontSize: '1.1rem' }}> - {formatWonDelta(seat.handDelta)} -
- )} -
-
- ); -} - function Center({ view: v, potRef }: { view: SeotdaView; potRef: (el: HTMLElement | null) => void }) { const limit = v.options.endCondition === 'hands' ? `/${v.options.handLimit}` : ''; // On the result screen the paid pots are no longer in v.pot (only a carried rematch pot is). @@ -473,16 +459,16 @@ function useTableEffects(v: SeotdaView, me: string | null, tableRef: React.RefOb return { flies, banner }; } -// ---------------------------------------------------------------- bet bar +// ---------------------------------------------------------------- bottom bar (한게임 섯다처럼: 족보 · 내 얼굴 · 내 패 · 베팅 버튼) -function BetBar({ view: v, me, act, pending, players }: { view: SeotdaView; me: string; act: (a: unknown) => void; pending: boolean; players: Record }) { +/** Bet buttons in 한게임's two columns (콜 다이 / 삥 체크 / 따당 · / 하프 ·); 쿼터 and 풀 take the free right cells. */ +const GRID: (BetType | null)[] = ['call', 'die', 'ping', 'check', 'ddadang', 'quarter', 'half', 'full']; + +function BetGrid({ view: v, me, act, pending, setHover }: { view: SeotdaView; me: string; act: (a: unknown) => void; pending: boolean; setHover: (t: BetType | null) => void }) { const seat = v.seats.find((s) => s.id === me)!; - const myTurn = v.toAct === me && v.handPhase === 'betting'; + const myTurn = v.toAct === me && v.handPhase === 'betting' && seat.inHand && !seat.folded; const legal = new Map(v.legal.map((l) => [l.type, l])); - const [hover, setHover] = useState(null); - const types: BetType[] = ['call', 'die', 'half', 'ping', 'check', 'ddadang']; - if (v.options.quarter) types.push('quarter'); - if (v.options.maxRaise === 'full') types.push('full'); + const shown = (t: BetType) => (t === 'quarter' ? v.options.quarter : t === 'full' ? v.options.maxRaise === 'full' : true); const press = (t: BetType) => { if (!myTurn || pending || !legal.has(t)) return; sfx.click(); @@ -505,131 +491,225 @@ function BetBar({ view: v, me, act, pending, players }: { view: SeotdaView; me: window.addEventListener('keydown', onKey); return () => window.removeEventListener('keydown', onKey); }, []); - const hoverBet = hover ? legal.get(hover) : undefined; return ( -
-
-
- {types.map((t) => { - const l = legal.get(t); - const enabled = myTurn && !!l && !pending; - return ( - - ); - })} -
-
-

- {myTurn - ? hoverBet - ? `${BET_KO[hover!]}: ${BET_HELP[hover!]}. 걸고 나면 내 돈 ${formatWon(seat.stack - hoverBet.amount)}, 판돈 ${formatWon(v.pot + hoverBet.amount)}` - : v.forcedHalf - ? `베팅 규칙 ${v.options.betRule}: 첫 베팅은 하프 또는 다이만 할 수 있어요.` - : '내 차례예요. 버튼이나 숫자 키로 걸어요.' - : v.toAct - ? `${nick(players, v.toAct)}님 차례예요.` - : ' '} -

+
+ {GRID.map((t, i) => { + if (!t || !shown(t)) return ; + const l = legal.get(t); + const enabled = myTurn && !!l && !pending; + return ( + + ); + })}
); } -// ---------------------------------------------------------------- 3장 섯다 choice and result - -/** 3장 섯다 (한게임): of the first two cards, pick the one everyone gets to see. */ -function OpenBox({ view: v, me, act, pending }: { view: SeotdaView; me: string; act: (a: unknown) => void; pending: boolean }) { - const seat = v.seats.find((s) => s.id === me)!; - const [pick, setPick] = useState(null); - useEffect(() => setPick(null), [v.handNo, v.rematchNo]); - const cards = seat.cards.filter(isCard); - const picked = cards.find((c) => c.id === pick); - return ( -
-

- 모두에게 보여 줄 패 1장을 골라 주세요. 나머지 1장과 다음에 받을 1장은 나만 봐요. -

-
- {cards.map((c) => ( - setPick(c.id)} /> - ))} -
- -
- ); +interface DockProps { + view: SeotdaView; + seat: SeotdaSeatView | null; + players: Record; + act: (a: unknown) => void; + pending: boolean; + deadline: number | null; + winner: boolean; + setRef: SeatProps['setRef']; + phone: boolean; } -/** Everyone else died: show my cards to everyone, or keep them hidden (the default when time runs out). */ -function RevealBox({ view: v, act, pending }: { view: SeotdaView; act: (a: unknown) => void; pending: boolean }) { - return ( -
-

- 모두 다이해서 판돈 {formatWon(v.pot)}은 내 거예요. 내 패를 모두에게 보여 줄까요? 시간이 지나면 공개하지 않아요. -

-
- - -
-
- ); -} - -function ChooseBox({ view: v, me, act, pending }: { view: SeotdaView; me: string; act: (a: unknown) => void; pending: boolean }) { - const seat = v.seats.find((s) => s.id === me)!; +/** + * The bottom bar, laid out like 한게임 섯다: 족보판 on the left, my face and clock, my cards with the current 족보 under + * them, then the number-key bet buttons. In 3장 섯다 the cards themselves are clicked to pick the open card / the two + * cards to use, and the bet buttons make room for that step's button. + */ +function Dock({ view: v, seat, players, act, pending, deadline, winner, setRef, phone }: DockProps) { const [pick, setPick] = useState([]); - useEffect(() => setPick([]), [v.handNo, v.rematchNo]); - const cards = seat.cards.filter(isCard); - const preview = pick.length === 2 ? v.myCombos?.find((c) => c.cardIds.includes(pick[0]!) && c.cardIds.includes(pick[1]!)) : null; - const toggle = (id: number) => setPick((p) => (p.includes(id) ? p.filter((x) => x !== id) : p.length >= 2 ? [p[1]!, id] : [...p, id])); - return ( -
-

- 쓸 패 2장을 골라 주세요. 남는 1장은 아무에게도 보이지 않아요. -

-
- {cards.map((c) => ( - toggle(c.id)} /> - ))} -
- {v.options.hints && v.myCombos && ( -
- {v.myCombos.map((c) => ( - - ))} + ) : ( + + {c.name} + + ), + )} + + ); + else if (playing && h) under = {h.name}; + + let actions: ReactNode; + if (opening) + actions = ( + <> +

+ 모두에게 보여 줄 패 1장을 눌러 고르세요. 나머지 1장과 다음에 받을 1장은 나만 봐요. +

+ + + ); + else if (choosing) + actions = ( + <> +

+ 쓸 패 2장을 눌러 고르세요. 남는 1장은 아무에게도 보이지 않아요. +

+ + + ); + else if (revealing) + actions = ( + <> +

+ 모두 다이해서 판돈 {formatWon(v.pot)}은 내 거예요. 내 패를 보여 줄까요? 시간이 지나면 공개하지 않아요. +

+ + + + ); + else if (v.handPhase === 'open' && seat?.opening === true) actions =

공개패를 골랐어요. 다른 사람을 기다리는 중이에요.

; + else if (v.handPhase === 'choose' && seat?.chosen === true) actions =

골랐어요. 다른 사람이 고르기를 기다리는 중이에요.

; + else if (v.reveal) actions =

{nick(players, v.reveal.by)}님이 카드 공개 여부를 고르는 중이에요.

; + else if (v.handPhase === 'handEnd') + actions = ( + <> + + {seat && seat.status === 'playing' && !seat.left && ( + + )} + + ); + else if (seat) actions = ; + else actions =

구경 중이에요.

; + + const help = myTurn + ? hoverBet + ? `${BET_KO[hover!]}: ${BET_HELP[hover!]}. 걸고 나면 내 돈 ${formatWon(seat!.stack - hoverBet.amount)}, 판돈 ${formatWon(v.pot + hoverBet.amount)}` + : v.forcedHalf + ? `베팅 규칙 ${v.options.betRule}: 첫 베팅은 하프 또는 다이만 할 수 있어요.` + : '내 차례예요. 버튼이나 숫자 키로 걸어요.' + : v.handPhase === 'betting' && v.toAct + ? `${nick(players, v.toAct)}님 차례예요.` + : ' '; + + return ( + <> +
+ + {seat && u && ( +
setRef(seat.id, el)} aria-label={`내 자리, 보유 ${formatWon(seat.stack)}`}> + + + {u.nickname} (나) + {formatWonShort(seat.stack)}원 + + {seat.isDealer && ( + + 선 + + )} + {timed && } + + {seat.handDelta !== null && seat.handDelta !== 0 && 0 ? 'plus' : 'minus'}`}>{formatWonDelta(seat.handDelta)}} +
+ )} +
+ {seat && ( +
+
+ {cards.length === 0 && {seat.inHand ? '패를 기다리는 중' : '이번 판은 쉬어요'}} + {cards.map((c, i) => + isCard(c) ? ( + onCard(c.id)} + disabled={!opening && !choosing} + selected={(opening || choosing) && pick.includes(c.id)} + highlight={!!v.myChosen?.includes(c.id) || (!v.myChosen && v.myOpened === c.id)} + dimmed={(!!v.myChosen && !v.myChosen.includes(c.id)) || seat.folded} + style={{ ['--anim-delay' as string]: `${i * 110}ms`, ['--from-y' as string]: '-180px' }} + /> + ) : ( + + ), + )} +
+ {under &&
{under}
} + {playing && h && hints && !seat.handName && {h.hint}} + {seat.folded && !seat.handName && 다이했어요. 내 패는 나만 볼 수 있어요.} +
+ )} +
{actions}
- )} - -
+
+

{help}

+ ); } +// ---------------------------------------------------------------- result + export function resultLine(v: SeotdaView, players: Record): string { if (v.foldWin) return `${nick(players, v.foldWin.winner)}님이 판돈 ${formatWon(v.foldWin.amount)}을 가져갔어요(모두 다이${v.foldWin.shown ? ' · 패 공개' : ''}).`; if (!v.showdown) return ''; @@ -647,7 +727,7 @@ export function resultLine(v: SeotdaView, players: Record): function ResultPanel({ view: v, players }: { view: SeotdaView; players: Record }) { const foldName = v.foldWin ? v.seats.find((s) => s.id === v.foldWin!.winner)?.handName : null; return ( -
+
{v.next === 'rematch' ? '재경기가 정해졌어요' : '이번 판 결과'} {v.foldWin && ( @@ -747,7 +827,6 @@ export function SeotdaBoard({ view: v, me, players, act, pending, deadline }: Bo othersEls )}
(potEl.current = el)} /> - {mySeat && } {flies.map((f) => ( ))} @@ -757,19 +836,7 @@ export function SeotdaBoard({ view: v, me, players, act, pending, deadline }: Bo
)}
- {mySeat && v.handPhase === 'open' && mySeat.opening === false && } - {mySeat && v.handPhase === 'open' && mySeat.opening === true &&

공개패를 골랐어요. 다른 사람을 기다리는 중이에요.

} - {v.reveal?.mine && } - {v.reveal && !v.reveal.mine &&

{nick(players, v.reveal.by)}님이 카드 공개 여부를 고르는 중이에요.

} - {mySeat && v.handPhase === 'choose' && mySeat.chosen === false && } - {mySeat && v.handPhase === 'choose' && mySeat.chosen === true &&

골랐어요. 다른 사람이 고르기를 기다리는 중이에요.

} - {mySeat && mySeat.inHand && v.handPhase === 'betting' && !mySeat.folded && } - {v.handPhase === 'handEnd' && } - {mySeat && v.handPhase === 'handEnd' && mySeat.status === 'playing' && !mySeat.left && ( - - )} +

{announce}

diff --git a/apps/web/src/games/seotda/help.test.ts b/apps/web/src/games/seotda/help.test.ts index cf187ab..22ffcb8 100644 --- a/apps/web/src/games/seotda/help.test.ts +++ b/apps/web/src/games/seotda/help.test.ts @@ -65,7 +65,7 @@ test('섯다: 2장째를 받으면 지금 내 족보와 마지막 베팅, 족보 const off = setupGame('seotda', 2, { hints: false }).state; const p = view(off, null).toAct as string; - expect(helpNow(view(off, p), p, users)).toContain("'족보 도우미'를 보고"); + expect(helpNow(view(off, p), p, users)).toContain("'족보'판을 보고"); }); test('섯다: 3장 섯다 공개패 → 베팅 2번 → 고르기 단계(한게임)', () => { diff --git a/apps/web/src/games/seotda/help.ts b/apps/web/src/games/seotda/help.ts index a5ef9a8..9f89b5b 100644 --- a/apps/web/src/games/seotda/help.ts +++ b/apps/web/src/games/seotda/help.ts @@ -34,10 +34,10 @@ function roundText(v: SeotdaView): string { /** My current hand as the view gives it (hints option on). */ function handLine(v: SeotdaView, seat: SeotdaSeatView): string { const h = v.myHand; - if (!h) return seat.cards.length > 0 ? "이 방은 족보 이름을 따로 보여 주지 않아요. '족보 도우미'를 보고 내 패를 맞춰 보세요." : ''; + if (!h) return seat.cards.length > 0 ? "이 방은 족보 이름을 따로 보여 주지 않아요. 아래 '족보'판을 보고 내 패를 맞춰 보세요." : ''; if (h.special) return h.hint; if (h.value === null) return `지금은 ${h.name}만 받았어요. ${h.hint}`; - return `지금 내 족보: ${h.name}${h.strength ? `(${STRENGTH_KO[h.strength]})` : ''}. 족보 도우미에 '내 패'로 표시돼요.`; + return `지금 내 족보: ${h.name}${h.strength ? `(${STRENGTH_KO[h.strength]})` : ''}. 아래 족보판에 보라색으로 표시돼요.`; } function rematchLine(v: SeotdaView): string { diff --git a/apps/web/src/games/seotda/index.tsx b/apps/web/src/games/seotda/index.tsx index e593a9e..5c1f899 100644 --- a/apps/web/src/games/seotda/index.tsx +++ b/apps/web/src/games/seotda/index.tsx @@ -3,121 +3,20 @@ * 원은 이 방 안에서만 쓰는 놀이용 숫자다(§12): 진짜 돈과 바꿀 수 없고 방이 끝나면 사라진다. */ import { useState } from 'react'; -import type { SeotdaOptions, SeotdaView, SpecialKind } from '@bg/games/seotda'; +import type { SeotdaOptions, SeotdaView } from '@bg/games/seotda'; import { formatWon, formatWonDelta, formatWonShort } from '@bg/games/seotda/money'; import type { PublicUser } from '@bg/shared/lite'; import { Avatar, ConfirmSheet, Sheet } from '../../components/ui'; import { TurnTimer } from '../../components/TurnTimer'; -import { HWATU_CREDIT, HwatuCard, type HwatuInfo } from '../../components/cards/HwatuCard'; +import { HWATU_CREDIT } from '../../components/cards/HwatuCard'; import type { BoardProps, GameUI, OptionsProps } from '../types'; import { BET_KO, SeotdaBoard, nick, resultLine, totalMsOf, userOf } from './board'; import { helpNow } from './help'; +import { JokboTable } from './jokbo'; import { quickStart } from './quick'; -/** Illustration card for the 족보표 (no rule code needed on the client). */ -function illus(month: number, special: boolean): HwatuInfo { - const gwang = [1, 3, 8].includes(month); - const kind: HwatuInfo['kind'] = special ? (gwang ? 'gwang' : 'yeol') : month === 8 ? 'pi' : 'tti'; - return { - id: (month - 1) * 4 + (special ? 0 : 1), - month, - kind, - ...(kind === 'tti' ? { tti: 'plain' as const } : {}), - name: `${month}월 ${special ? (gwang ? '광' : '열끗') : month === 8 ? '기러기' : '띠'}`, - }; -} - const PLAY_MONEY_NOTICE = '여기 나오는 원과 판돈은 이 방 안에서만 쓰는 놀이용 숫자예요. 진짜 돈과는 아무 상관이 없고, 바꾸거나 주고받을 수 없으며 방이 끝나면 사라져요.'; -// ---------------------------------------------------------------- 족보 도우미 - -interface JokboRow { - name: string; - cards: [number, boolean][]; - note: string; - match: (value: number | null, special: SpecialKind | null) => boolean; - /** 특수 족보 (numbered "특" like the 한게임 족보 list). */ - special?: boolean; -} - -function jokboRows(o: SeotdaOptions): JokboRow[] { - const v = (lo: number, hi = lo) => (x: number | null, sp: SpecialKind | null) => !sp && x !== null && x >= lo && x <= hi; - const rows: JokboRow[] = [ - { name: '38광땡', cards: [[3, true], [8, true]], note: '가장 센 패', match: v(1000) }, - ...(o.gwangTtaeng === 'all' - ? [ - { name: '18광땡', cards: [[1, true], [8, true]], note: '', match: v(990) } as JokboRow, - { name: '13광땡', cards: [[1, true], [3, true]], note: '', match: v(980) } as JokboRow, - ] - : []), - { name: '장땡(10땡)', cards: [[10, true], [10, false]], note: '같은 달 두 장 중 최고', match: v(910) }, - { name: '9땡 ~ 삥땡(1땡)', cards: [[9, true], [9, false]], note: '숫자가 클수록 셈', match: v(901, 909) }, - { name: '알리', cards: [[1, true], [2, false]], note: '1 + 2', match: v(806) }, - { name: '독사', cards: [[1, true], [4, false]], note: '1 + 4', match: v(805) }, - { name: '구삥', cards: [[1, true], [9, false]], note: '1 + 9', match: v(804) }, - { name: '장삥', cards: [[1, true], [10, false]], note: '1 + 10', match: v(803) }, - { name: '장사', cards: [[4, false], [10, false]], note: '4 + 10', match: v(802) }, - { name: '세륙', cards: [[4, false], [6, false]], note: '4 + 6', match: v(801) }, - { name: '갑오(9끗)', cards: [[2, false], [7, false]], note: '두 달을 더한 일의 자리 9', match: v(9) }, - { name: '8끗 ~ 1끗', cards: [[3, false], [5, false]], note: '일의 자리가 클수록 셈', match: v(1, 8) }, - { name: '망통(0끗)', cards: [[2, false], [8, false]], note: '가장 약한 패', match: v(0) }, - ]; - const sp = (k: SpecialKind) => (_x: number | null, s: SpecialKind | null) => s === k; - if (o.ttaengjabi !== 'off') - rows.push({ - name: '땡잡이', - special: true, - cards: [[3, true], [7, true]], - note: `${o.ttaengjabi === 'strict' ? '3월 광 + 7월 열끗' : '3월 + 7월'}. 상대 최고가 1~9땡이면 이김, 아니면 망통`, - match: sp('ttaengjabi'), - }); - if (o.amhaeng) rows.push({ name: '암행어사', special: true, cards: [[4, true], [7, true]], note: '4·7월 열끗. 13·18광땡을 잡음, 아니면 1끗', match: sp('amhaeng') }); - if (o.gusa) { - rows.push({ name: '구사', special: true, cards: [[4, false], [9, true]], note: '4 + 9. 상대가 알리 이하면 재경기, 아니면 3끗', match: sp('gusa') }); - if (o.mungGusa !== 'off') { - const upTo = o.mungGusa === 'upTo9' ? '9땡' : o.mungGusa === 'upToJang' ? '장땡' : '8땡'; - rows.push({ name: '멍텅구리구사', special: true, cards: [[4, true], [9, true]], note: `4·9월 열끗. 상대가 ${upTo} 이하면 재경기`, match: sp('mungGusa') }); - } - } - return rows; -} - -function JokboTable({ options, mine }: { options: SeotdaOptions; mine?: SeotdaView['myHand'] }) { - const rows = jokboRows(options); - return ( - - - {rows.map((r, i) => { - const hit = !!mine && options.hints && r.match(mine.value, mine.special); - return ( - - - - - - ); - })} - -
{r.special ? '특' : i + 1} - {r.cards.map(([m, sp], j) => ( - - ))} - - {r.name} - {hit && ( - - 내 패 - - )} - {r.note &&
{r.note}
} -
- ); -} - // ---------------------------------------------------------------- side panel function SeotdaSide({ view: v, me, players, act, pending, deadline }: BoardProps) { @@ -181,10 +80,6 @@ function SeotdaSide({ view: v, me, players, act, pending, deadline }: BoardProps )} -
- 족보 도우미 - -
{v.history.length > 0 && (
판 기록 diff --git a/apps/web/src/games/seotda/jokbo.tsx b/apps/web/src/games/seotda/jokbo.tsx new file mode 100644 index 0000000..79224c0 --- /dev/null +++ b/apps/web/src/games/seotda/jokbo.tsx @@ -0,0 +1,160 @@ +/** + * 섯다 족보 (docs/games/seotda.md §3): the rows for the current room rules, the full table (규칙 화면) and the compact + * 족보판 at the left of the bottom bar (한게임 섯다처럼 3열 목록 + 고른 족보 설명). + */ +import { useEffect, useState } from 'react'; +import type { SeotdaOptions, SeotdaView, SpecialKind } from '@bg/games/seotda'; +import { HwatuCard, type HwatuInfo } from '../../components/cards/HwatuCard'; + +/** Illustration card for the 족보표 (no rule code needed on the client). */ +export function illus(month: number, special: boolean): HwatuInfo { + const gwang = [1, 3, 8].includes(month); + const kind: HwatuInfo['kind'] = special ? (gwang ? 'gwang' : 'yeol') : month === 8 ? 'pi' : 'tti'; + return { + id: (month - 1) * 4 + (special ? 0 : 1), + month, + kind, + ...(kind === 'tti' ? { tti: 'plain' as const } : {}), + name: `${month}월 ${special ? (gwang ? '광' : '열끗') : month === 8 ? '기러기' : '띠'}`, + }; +} + + + +export interface JokboRow { + name: string; + /** Short label for the compact 족보 board under the table. */ + short: string; + cards: [number, boolean][]; + note: string; + match: (value: number | null, special: SpecialKind | null) => boolean; + /** 특수 족보 (numbered "특" like the 한게임 족보 list). */ + special?: boolean; +} + +export function jokboRows(o: SeotdaOptions): JokboRow[] { + const v = (lo: number, hi = lo) => (x: number | null, sp: SpecialKind | null) => !sp && x !== null && x >= lo && x <= hi; + const rows: JokboRow[] = [ + { name: '38광땡', short: '38광땡', cards: [[3, true], [8, true]], note: '가장 센 패', match: v(1000) }, + ...(o.gwangTtaeng === 'all' + ? [ + { name: '18광땡', short: '18광땡', cards: [[1, true], [8, true]], note: '1월 광 + 8월 광', match: v(990) } as JokboRow, + { name: '13광땡', short: '13광땡', cards: [[1, true], [3, true]], note: '1월 광 + 3월 광', match: v(980) } as JokboRow, + ] + : []), + { name: '장땡(10땡)', short: '장땡', cards: [[10, true], [10, false]], note: '같은 달 두 장 중 최고', match: v(910) }, + { name: '9땡 ~ 삥땡(1땡)', short: '9~1땡', cards: [[9, true], [9, false]], note: '숫자가 클수록 셈', match: v(901, 909) }, + { name: '알리', short: '알리', cards: [[1, true], [2, false]], note: '1 + 2', match: v(806) }, + { name: '독사', short: '독사', cards: [[1, true], [4, false]], note: '1 + 4', match: v(805) }, + { name: '구삥', short: '구삥', cards: [[1, true], [9, false]], note: '1 + 9', match: v(804) }, + { name: '장삥', short: '장삥', cards: [[1, true], [10, false]], note: '1 + 10', match: v(803) }, + { name: '장사', short: '장사', cards: [[4, false], [10, false]], note: '4 + 10', match: v(802) }, + { name: '세륙', short: '세륙', cards: [[4, false], [6, false]], note: '4 + 6', match: v(801) }, + { name: '갑오(9끗)', short: '갑오', cards: [[2, false], [7, false]], note: '두 달을 더한 일의 자리 9', match: v(9) }, + { name: '8끗 ~ 1끗', short: '8~1끗', cards: [[3, false], [5, false]], note: '일의 자리가 클수록 셈', match: v(1, 8) }, + { name: '망통(0끗)', short: '망통', cards: [[2, false], [8, false]], note: '가장 약한 패', match: v(0) }, + ]; + const sp = (k: SpecialKind) => (_x: number | null, s: SpecialKind | null) => s === k; + if (o.ttaengjabi !== 'off') + rows.push({ + name: '땡잡이', + short: '땡잡이', + special: true, + cards: [[3, true], [7, true]], + note: `${o.ttaengjabi === 'strict' ? '3월 광 + 7월 열끗' : '3월 + 7월'}. 상대 최고가 1~9땡이면 이김, 아니면 망통`, + match: sp('ttaengjabi'), + }); + if (o.amhaeng) rows.push({ name: '암행어사', short: '암행어사', special: true, cards: [[4, true], [7, true]], note: '4·7월 열끗. 13·18광땡을 잡음, 아니면 1끗', match: sp('amhaeng') }); + if (o.gusa) { + rows.push({ name: '구사', short: '구사', special: true, cards: [[4, false], [9, true]], note: '4 + 9. 상대가 알리 이하면 재경기, 아니면 3끗', match: sp('gusa') }); + if (o.mungGusa !== 'off') { + const upTo = o.mungGusa === 'upTo9' ? '9땡' : o.mungGusa === 'upToJang' ? '장땡' : '8땡'; + rows.push({ name: '멍텅구리구사', short: '멍구사', special: true, cards: [[4, true], [9, true]], note: `4·9월 열끗. 상대가 ${upTo} 이하면 재경기`, match: sp('mungGusa') }); + } + } + return rows; +} + +export function JokboTable({ options, mine }: { options: SeotdaOptions; mine?: SeotdaView['myHand'] }) { + const rows = jokboRows(options); + return ( + + + {rows.map((r, i) => { + const hit = !!mine && options.hints && r.match(mine.value, mine.special); + return ( + + + + + + ); + })} + +
{r.special ? '특' : i + 1} + {r.cards.map(([m, sp], j) => ( + + ))} + + {r.name} + {hit && ( + + 내 패 + + )} + {r.note &&
{r.note}
} +
+ ); +} + +/** + * Compact 족보판 (bottom-left of the table, like 한게임 섯다): every hand in 3 columns, my current hand lit up (when + * hints are on); the line below explains the selected hand (my hand by default, or the one clicked). + */ +export function JokboBoard({ options, mine }: { options: SeotdaOptions; mine: SeotdaView['myHand'] }) { + const rows = jokboRows(options); + const hitIdx = mine && options.hints ? rows.findIndex((r) => r.match(mine.value, mine.special)) : -1; + const [sel, setSel] = useState(null); + useEffect(() => setSel(null), [hitIdx]); + const shown = rows[sel ?? (hitIdx >= 0 ? hitIdx : 0)]!; + let n = 0; + return ( +
+

족보

+
    + {rows.map((r, i) => { + const label = r.special ? `*${r.short}` : `${++n}.${r.short}`; + return ( +
  1. + +
  2. + ); + })} +
+
+ + {shown.cards.map(([m, sp], j) => ( + + ))} + + + {shown.name} + {shown.note ? ` ${shown.note}` : ''} + +
+
+ ); +} diff --git a/apps/web/src/games/seotda/quick.tsx b/apps/web/src/games/seotda/quick.tsx index 3b24e88..f18b1e5 100644 --- a/apps/web/src/games/seotda/quick.tsx +++ b/apps/web/src/games/seotda/quick.tsx @@ -89,6 +89,6 @@ export const quickStart: QuickCard[] = [ ), alt: '장땡, 알리, 8끗 순서로 화투 두 장씩 놓여 있고 사이에 큰 쪽 표시가 있어요', title: '땡 > 알리 > 끗 순서예요', - text: "광땡 > 땡(같은 달 2장) > 알리·독사 등 > 끗(두 달을 더한 일의 자리) 순으로 세요. 화면의 '족보 도우미'를 보면 쉬워요.", + text: "광땡 > 땡(같은 달 2장) > 알리·독사 등 > 끗(두 달을 더한 일의 자리) 순으로 세요. 화면 아래 '족보'판을 보면 쉬워요.", }, ]; diff --git a/docs/games/seotda.md b/docs/games/seotda.md index f9cdb92..d8e780f 100644 --- a/docs/games/seotda.md +++ b/docs/games/seotda.md @@ -484,12 +484,13 @@ interface SeotdaResult /* extends GameResult */ { 한게임 섯다 화면을 본떴다(`apps/web/src/games/seotda/board.tsx`). -화면 배치: -- PC: 나무 테두리의 초록 테이블. 다른 사람 자리는 내 왼쪽 아래에서 위를 돌아 오른쪽 아래까지 둥글게, 내 자리는 테이블 아래 가운데에 크게(패 2~3장, 족보 이름 금색 큰 글씨, 보유 금액). 가운데에 동전 더미와 **판돈** 큰 숫자, 그 밑에 판 수·기본금·현재 콜 금액. 재경기면 "재경기 2회차 · 구사" 띠. -- 자리 상자: 아바타, 닉네임, 선 표시, 남은 시간 고리, 보유 금액(만 단위로 줄임), 이번 판에 건 돈, 카드 뒷면, 마지막 행동 말풍선(콜·하프·다이 … 색 구분), 쇼다운 뒤 족보 이름(땡 이상은 금색)과 딴/잃은 금액(+1만 5,000원 / -1만원), 이긴 자리는 금빛 테두리. -- 휴대폰: 테이블이 세로로 바뀐다. 위에 다른 사람 자리 2~3열, 가운데 판돈, 아래 내 자리. 버튼은 3열. -- 아래: 베팅 버튼 3×2(콜·다이·하프 / 삥·체크·따당, 쿼터·풀을 켜면 한 줄 더). 버튼마다 낼 금액과 숫자 키(PC)를 적는다. 못 누르는 버튼은 흐리게 두고 자리를 바꾸지 않는다(오조작 방지). 마우스를 올리면 "걸고 나면 내 돈 … 판돈 …"을 미리 보여 준다. -- 옆 패널: 놀이용 원 안내, 판 정보·시간, 보유 금액 순위, 이번 판 베팅 기록, **족보 도우미**(번호가 작을수록 센 족보, 내 패 줄을 보라색으로 강조, 켜진 특수패만), 판 기록. +화면 배치 (2026-10-17 한게임 섯다 화면 사진대로 다시 짬): +- 테이블(위): 나무 테두리의 초록 테이블. 다른 사람 자리는 왼쪽 아래에서 위를 돌아 오른쪽 아래까지 둥글게, 자리마다 패가 위·이름과 돈이 아래. 가운데에 동전 더미와 **판돈** 큰 숫자, 그 밑에 판 수·기본금·현재 콜 금액. 재경기면 "재경기 2회차 · 구사" 띠. 내 자리는 테이블 안에 두지 않는다. +- 자리 상자: 패(공개패·쇼다운 패는 앞면, 왼쪽 아래 큰 월 숫자), 아바타, 닉네임, 선 표시, 남은 시간 고리, 보유 금액(만 단위로 줄임), 이번 판에 건 돈, 마지막 행동 말풍선(콜·하프·다이 … 색 구분), 쇼다운 뒤 족보 이름(땡 이상은 금색)과 딴/잃은 금액, 이긴 자리는 금빛 테두리. +- 아래 금색 판(PC, 왼쪽부터): **족보판**(3열 목록 `1.38광땡 … 14.망통`, 특수패는 `*땡잡이`처럼 켜진 것만, 내 지금 족보 칸을 보라색으로 강조, 칸을 누르면 아래 줄에 그 족보의 그림 2장과 설명, 기본은 내 족보) · 내 얼굴(아바타·닉네임·보유 금액·선·남은 시간, 쇼다운 뒤 딴/잃은 금액) · **내 패**(2~3장 크게, 그 밑에 지금 족보 이름, 3장일 때는 세 조합의 족보를 나란히 적고 가장 센 것을 금색으로, 그 밑에 한 줄 도움말) · **베팅 버튼** 두 줄(왼쪽 콜7·삥4·따당1·하프0, 오른쪽 다이8·체크5, 쿼터2·풀9를 켜면 오른쪽 빈칸). 버튼마다 숫자 키를 왼쪽에 적고, 내 차례일 때만 낼 금액이 나온다. 못 누르는 버튼은 흐리게 두고 자리를 바꾸지 않는다(오조작 방지). 마우스를 올리면 판 아래 줄에 "걸고 나면 내 돈 … 판돈 …"을 미리 보여 준다. +- 베팅 버튼 자리는 단계에 따라 바뀐다: 3장 섯다 공개패 고르기(내 패를 눌러 1장 → "N월 패 공개하기")·쓸 패 고르기(내 패 2장을 누르거나 족보 조합 버튼 → "…(으)로 정하기"), 모두 다이했을 때 카드 공개/공개 안 함, 판이 끝나면 **이번 판 결과**와 "다음 판으로". +- 화면 폭이 좁으면(판 폭 900px 아래) 족보판이 금색 판 맨 아래 한 줄(6열)로 내려간다. 휴대폰: 테이블이 세로로 바뀌어 위에 다른 사람 자리 2~3열, 가운데 판돈. 금색 판은 내 얼굴 한 줄 → 내 패 → 버튼 3열(콜·다이·삥 / 체크·따당·하프) → 족보판 3열 순서. +- 옆 패널: 놀이용 원 안내, 판 정보·시간, 보유 금액 순위, 이번 판 베팅 기록, 판 기록. 족보 전체 표(그림·설명)는 규칙 화면에 있다. 소리와 움직임(내 행동이든 상대·컴퓨터 행동이든 화면 변화에 반응, 한 변화에 한 번만): - 새 판·재경기: 섞는 소리, 카드가 위에서 날아와 놓임(`anim-deal`), 장수만큼 카드 소리.