섯다·포커: 다른 사람이 모두 죽고 혼자 남으면 카드를 공개할지 고르기(카드 공개/공개 안 함, 시간 초과·나감·기본은 공개 안 함, 공개하면 모두에게 패와 족보를 뒤집어 보여 주고 기록에 남김, 컴퓨터도 센 패면 가끔 공개)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
EJClaw
2026-10-14 04:27:55 +09:00
parent 73b929739d
commit 966bc3c5ef
20 changed files with 529 additions and 48 deletions

View File

@@ -82,10 +82,16 @@ test('텍사스 홀덤: 노리밋 버튼과 공용 카드, 모두 포기하면
const flop = drive(state, (x) => x.handPhase === 'betting' && x.board.length === 3);
expect(help(flop, null)).toContain('가운데 공용 카드 3장이 펼쳐져 있어요');
const s = applyAction('poker', state, turn, { type: 'nl.fold' });
const r = applyAction('poker', state, turn, { type: 'nl.fold' });
expect(view(r, null).handPhase).toBe('reveal');
expect(help(r, other)).toContain('[카드 공개]');
expect(help(r, turn)).toContain(`혼자 남은 ${nickOf(other)}이 카드 공개 여부를 고르는 중이에요`);
const shown = applyAction('poker', r, other, { type: 'reveal', show: true });
expect(help(shown, turn)).toContain('패를 공개했어요(');
const s = applyAction('poker', r, other, { type: 'reveal', show: false });
expect(view(s, null).handPhase).toBe('handEnd');
const w = help(s, other);
expect(w).toContain('다른 사람이 모두 포기해서 내가 모인 칩을 가져갔어요');
expect(w).toContain('다른 사람이 모두 포기해서 내가 모인 칩을 가져갔어요. 패는 공개하지 않았어요.');
expect(w).toContain('[다음 판으로]');
expect(help(s, null)).toContain(`${nickOf(other)}이 모인 칩을 가져갔어요`);
});

View File

@@ -149,6 +149,8 @@ function watchText(v: PokerView, players: Record<string, PublicUser>, me: string
return `모두 동시에 바꿀 카드를 고르는 중이에요(${drawName(v)}). 버린 카드는 공개되지 않고, 바꾼 장수만 각 자리에 보여요.${waiting}`;
case 'declare':
return `남은 사람들이 하이·로우·스윙 중 하나를 몰래 고르는 중이에요. 모두 고르면 한꺼번에 공개돼요.${waiting}`;
case 'reveal':
return `다른 사람이 모두 포기해서 혼자 남은 ${nickOf(players, v.waiting[0])}이 카드 공개 여부를 고르는 중이에요.`;
default:
return '카드를 나눠 주는 중이에요. 잠시만 기다려 주세요.';
}
@@ -161,7 +163,8 @@ function handEndText(v: PokerView, players: Record<string, PublicUser>, me: stri
const sdName = (id: string) => (v.mode === 'sevenHiLo' ? undefined : v.showdown?.find((e) => e.id === id)?.handName);
const who = (id: string) => (id === me ? '내가' : `${nickOf(players, id)}이`);
if (v.foldWin && v.winners.length === 1) {
lines.push(`다른 사람이 모두 포기해서 ${who(v.winners[0]!)} 모인 칩을 가져갔어요. 이럴 때는 패를 공개하지 않아요.`);
const shown = v.foldShown ? `패를 공개했어요(${v.foldShown.handName}).` : '패는 공개하지 않았어요.';
lines.push(`다른 사람이 모두 포기해서 ${who(v.winners[0]!)} 모인 칩을 가져갔어요. ${shown}`);
} else if (v.winners.length === 1) {
const name = sdName(v.winners[0]!);
lines.push(`이번 판은 ${who(v.winners[0]!)} ${name ? `${name}(으)로 ` : ''}이겼어요.`);
@@ -245,6 +248,14 @@ export function helpNow(v: PokerView, me: string | null, players: Record<string,
]);
}
return withHand([`${m.declare ? `${SIDE_KO[m.declare]}(으)로 선언했어요. ` : ''}다른 사람이 선언할 때까지 기다려 주세요.`]);
case 'reveal':
if (m.canReveal) {
return [
`다른 사람이 모두 포기해서 모인 칩 ${chips(v.pot)}은 내 거예요.`,
'[카드 공개]를 누르면 모두에게 내 카드를 보여 주고, [공개 안 함]을 누르면 아무도 내 카드를 못 봐요. 시간이 지나면 공개하지 않아요.',
].join('\n');
}
return `${watchText(v, players, me)}${away}`;
default:
return `${watchText(v, players, me)}${away}`;
}

View File

@@ -110,6 +110,7 @@ function seatBadges(seat: SeatView, v: PokerView): [string, string][] {
if (contesting && v.handPhase === 'draw') b.push(seat.drawDone ? ['냄', 'var(--success)'] : ['바꿀 카드 고르는 중', 'var(--text-sub)']);
if (contesting && v.handPhase === 'declare') b.push(seat.declared ? ['선언함', 'var(--success)'] : ['선언 고르는 중', 'var(--text-sub)']);
if (seat.declare) b.push([`선언: ${SIDE_KO[seat.declare]}`, '#7c3aed']);
if (v.handPhase === 'reveal' && v.waiting.includes(seat.id)) b.push(['카드 공개 고르는 중', 'var(--text-sub)']);
return b;
}
@@ -187,6 +188,7 @@ function SeatBox({ seat, v, players, me, deadline, x, y }: { seat: SeatView; v:
</div>
)}
<SeatCards seat={seat} v={v} me={me} />
{!sd && v.foldShown?.id === seat.id && <strong style={{ color: 'var(--primary)', textAlign: 'center' }}>{v.foldShown.handName}</strong>}
{sd && (
<strong style={{ color: 'var(--primary)', textAlign: 'center' }}>
{sd.handName}
@@ -458,6 +460,16 @@ function usePokerFx(v: PokerView, me: string | null, players: Record<string, Pub
}
t += n * 220 + 200;
}
// Everyone else folded and the last player showed the cards: turn them over.
const fs = v.foldShown;
if (fs && !p.foldShown && fs.id !== me) {
const s = v.seats.find((x) => x.id === fs.id);
const els = seatCardEls(fs.id);
const off = s?.forehead !== undefined ? 1 : 0;
for (let i = 0; i < (s?.hole.length ?? 0); i++) turnOver(els[off + i], t + i * 60);
later(t + 120, sfx.cardFlip);
t += 400;
}
// 인디언: my own forehead card is shown at the end of the hand.
const myNow = v.seats.find((s) => s.id === me);
const myBefore = p.seats.find((s) => s.id === me);
@@ -566,7 +578,7 @@ function resultLine(v: PokerView, players: Record<string, PublicUser>): string {
for (const a of v.awards) if (a.side !== 'refund') won.set(a.to, (won.get(a.to) ?? 0) + a.amount);
if (!won.size) return v.carryOver > 0 ? `동점이라 ${formatChips(v.carryOver)}이 다음 판으로 넘어가요` : '이번 판은 칩을 모두 돌려받았어요';
const parts = [...won].map(([id, amt]) => {
const name = v.showdown?.find((e) => e.id === id)?.handName;
const name = v.showdown?.find((e) => e.id === id)?.handName ?? (v.foldShown?.id === id ? v.foldShown.handName : undefined);
return `${nick(players, id)}님이 ${name ? `${name}(으)로 ` : ''}${formatChips(amt)}을 가져갔어요`;
});
return parts.join(' / ') + (v.foldWin ? ' (모두 포기)' : '');
@@ -577,7 +589,11 @@ function ResultPanel({ v, players }: { v: PokerView; players: Record<string, Pub
return (
<div className="card stack" style={{ gap: 6, padding: 12 }} aria-live="polite">
<strong>이번 판 결과</strong>
{v.foldWin && <span className="small muted">한 명만 남아서 패는 공개하지 않아요.</span>}
{v.foldWin && (
<span className="small muted">
{v.foldShown ? `한 명만 남았고, ${nick(players, v.foldShown.id)}님이 패를 공개했어요(${v.foldShown.handName}).` : '한 명만 남았고, 패는 공개하지 않았어요.'}
</span>
)}
{v.awards.map((a, i) => {
const sd = v.showdown?.find((e) => e.id === a.to);
const hand = !sd ? '' : a.side === 'low' ? (sd.lowName ? `로우 ${sd.lowName}` : '') : !a.side || a.side === 'high' || a.side === 'scoop' ? sd.handName : '';
@@ -639,6 +655,12 @@ function MyArea({ v, me, players, act, pending }: AreaProps) {
)}
</div>
)}
{m.canReveal && <RevealBox v={v} act={act} pending={pending} />}
{v.handPhase === 'reveal' && !m.canReveal && v.waiting[0] && (
<p className="small muted" style={{ margin: 0, textAlign: 'center' }}>
{nick(players, v.waiting[0])}님이 카드 공개 여부를 고르는 중이에요.
</p>
)}
{seat.inHand && v.handPhase === 'betting' && !seat.folded && !seat.allIn && <BetBar v={v} me={me} players={players} act={act} pending={pending} />}
{v.handPhase === 'handEnd' && <ResultPanel v={v} players={players} />}
{m.canReady && (
@@ -651,6 +673,25 @@ function MyArea({ v, me, players, act, pending }: AreaProps) {
);
}
/** Everyone else folded: show my cards to everyone, or keep them hidden (the default when time runs out). */
function RevealBox({ v, act, pending }: { v: PokerView; act: (a: unknown) => void; pending: boolean }) {
return (
<div className="card stack" style={{ gap: 8, padding: 12 }} role="group" aria-label="카드 공개">
<p style={{ margin: 0, textAlign: 'center' }}>
<strong>모두 포기해서 모인 칩 {formatChips(v.pot)}은 내 거예요.</strong> 내 카드를 모두에게 보여 줄까요? 시간이 지나면 공개하지 않아요.
</p>
<div className="row">
<button type="button" className="btn btn-primary" style={{ flex: 1 }} disabled={pending} onClick={() => act({ type: 'reveal', show: true })}>
카드 공개
</button>
<button type="button" className="btn btn-secondary" style={{ flex: 1 }} disabled={pending} onClick={() => act({ type: 'reveal', show: false })}>
공개 안 함
</button>
</div>
</div>
);
}
function MyCards({ v, seat }: { v: PokerView; seat: SeatView }) {
const sd = v.showdown?.find((e) => e.id === seat.id);
const best = new Set(sd?.best ?? []);
@@ -1094,6 +1135,8 @@ function statusText(v: PokerView, me: string | null, players: Record<string, Pub
return mine ? '내 차례예요. 바꿀 카드를 골라 주세요' : '다른 사람이 바꿀 카드를 고르는 중이에요';
case 'declare':
return mine ? '내 차례예요. 하이·로우·스윙을 선언해 주세요' : '다른 사람이 선언하는 중이에요';
case 'reveal':
return mine ? '모두 포기했어요. 내 카드를 공개할지 골라 주세요' : `${nick(players, v.waiting[0] ?? '')}님이 카드 공개 여부를 고르는 중이에요`;
case 'handEnd':
return resultLine(v, players) || '판이 끝났어요';
default:
@@ -1260,6 +1303,12 @@ function Rules({ options }: { options?: PokerOptions }) {
: `폴드(포기), 체크, 콜, 레이즈, 올인. 레이즈는 직전 레이즈만큼 이상 올려야 해요.${style === 'potLimit' ? ' 팟리밋은 모인 칩만큼까지만 올릴 수 있어요.' : ''}`}{' '}
칩이 모자라면 가진 만큼 내고 올인하며, 그 이상 걸린 칩은 따로(사이드 팟) 겨뤄요.
</p>
<p>
<strong>혼자 남으면</strong>: 다른 사람이 모두 포기하면 남은 한 명이 모인 칩을 가져가요.{' '}
{mode === 'indian'
? '인디언 포커는 판이 끝나면 모든 카드가 공개돼요.'
: '이때 남은 사람이 카드를 모두에게 보여 줄지([카드 공개]) 숨길지([공개 안 함]) 골라요. 시간이 지나면 공개하지 않아요.'}
</p>
<p>
<strong>족보</strong>
</p>

View File

@@ -58,6 +58,7 @@ export const isCard = (c: CardSlot): c is SeotdaCardView => !('hidden' in c);
export function totalMsOf(v: SeotdaView): number {
const o = v.options;
if (v.phase === 'rebuy' || v.handPhase === 'rejoin') return o.decisionSeconds * 1000;
if (v.handPhase === 'reveal') return v.seats.find((s) => s.id === v.reveal?.by)?.away ? 5000 : o.decisionSeconds * 1000;
if (v.handPhase === 'handEnd') return 5000;
if (o.turnSeconds === null) return 0;
if (v.handPhase === 'choose' || v.handPhase === 'open') return (o.turnSeconds + 10) * 1000;
@@ -227,7 +228,8 @@ function Seat({ seat, view: v, players, me, deadline, pos, cardW, winner, setRef
if (seat.chosen === true) tags.push(['고름', '#15803d']);
if (seat.chosen === false) tags.push(['고르는 중', '#475569']);
if (seat.opening === false) tags.push(['공개패 고르는 중', '#475569']);
const timed = seat.isTurn || seat.chosen === false || seat.opening === false;
if (v.reveal?.by === seat.id) tags.push(['카드 공개 고르는 중', '#475569']);
const timed = seat.isTurn || seat.chosen === false || seat.opening === false || v.reveal?.by === seat.id;
const style = pos ? ({ '--x': `${pos.x}%`, '--y': `${pos.y}%` } as CSSProperties) : undefined;
return (
<div
@@ -315,7 +317,7 @@ function MySeat({ seat, view: v, players, deadline, winner, setRef, phone }: { s
선
</span>
)}
{(seat.isTurn || seat.chosen === false || seat.opening === false) && <TurnTimer deadline={deadline} totalMs={totalMsOf(v)} mine size={30} />}
{(seat.isTurn || seat.chosen === false || seat.opening === false || !!v.reveal?.mine) && <TurnTimer deadline={deadline} totalMs={totalMsOf(v)} mine size={30} />}
</div>
<span className="sd-money" style={{ fontSize: '1.05rem' }}>
{formatWon(seat.stack)}
@@ -440,7 +442,7 @@ function useTableEffects(v: SeotdaView, me: string | null, tableRef: React.RefOb
});
// Result: reveal, payout, banner.
if (v.handPhase === 'handEnd' && prev.phase !== 'handEnd') {
if (v.showdown) sfx.cardFlip();
if (v.showdown || v.foldWin?.shown) sfx.cardFlip();
const winners = new Set<string>();
if (v.foldWin) winners.add(v.foldWin.winner);
for (const p of v.showdown?.pots ?? []) if (p.type !== 'rematch') for (const w of p.winners) winners.add(w);
@@ -574,6 +576,25 @@ function OpenBox({ view: v, me, act, pending }: { view: SeotdaView; me: string;
);
}
/** 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 (
<div className="card stack" style={{ gap: 8, padding: 12 }} role="group" aria-label="카드 공개">
<p style={{ margin: 0, textAlign: 'center' }}>
<strong>모두 다이해서 판돈 {formatWon(v.pot)}은 내 거예요.</strong> 내 패를 모두에게 보여 줄까요? 시간이 지나면 공개하지 않아요.
</p>
<div className="row">
<button type="button" className="btn btn-primary" style={{ flex: 1 }} disabled={pending} onClick={() => act({ type: 'reveal', show: true })}>
카드 공개
</button>
<button type="button" className="btn btn-secondary" style={{ flex: 1 }} disabled={pending} onClick={() => act({ type: 'reveal', show: false })}>
공개 안 함
</button>
</div>
</div>
);
}
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)!;
const [pick, setPick] = useState<number[]>([]);
@@ -609,7 +630,7 @@ function ChooseBox({ view: v, me, act, pending }: { view: SeotdaView; me: string
}
export function resultLine(v: SeotdaView, players: Record<string, PublicUser>): string {
if (v.foldWin) return `${nick(players, v.foldWin.winner)}님이 판돈 ${formatWon(v.foldWin.amount)}을 가져갔어요(모두 다이).`;
if (v.foldWin) return `${nick(players, v.foldWin.winner)}님이 판돈 ${formatWon(v.foldWin.amount)}을 가져갔어요(모두 다이${v.foldWin.shown ? ' · 패 공개' : ''}).`;
if (!v.showdown) return '';
return v.showdown.pots
.map((p) => {
@@ -623,12 +644,14 @@ export function resultLine(v: SeotdaView, players: Record<string, PublicUser>):
}
function ResultPanel({ view: v, players }: { view: SeotdaView; players: Record<string, PublicUser> }) {
const foldName = v.foldWin ? v.seats.find((s) => s.id === v.foldWin!.winner)?.handName : null;
return (
<div className="card stack" style={{ gap: 4, padding: 12 }} aria-live="polite">
<strong>{v.next === 'rematch' ? '재경기가 정해졌어요' : '이번 판 결과'}</strong>
{v.foldWin && (
<span>
{nick(players, v.foldWin.winner)}님이 판돈 {formatWon(v.foldWin.amount)}을 가져갔어요. 모두 다이해서 패는 공개하지 않아요.
{nick(players, v.foldWin.winner)}님이 판돈 {formatWon(v.foldWin.amount)}을 가져갔어요.{' '}
{v.foldWin.shown ? `모두 다이했고, 패를 공개했어요${foldName ? `(${foldName})` : ''}.` : '모두 다이했고, 패는 공개하지 않았어요.'}
</span>
)}
{v.showdown?.pots.map((p, i) => {
@@ -735,6 +758,8 @@ export function SeotdaBoard({ view: v, me, players, act, pending, deadline }: Bo
</div>
{mySeat && v.handPhase === 'open' && mySeat.opening === false && <OpenBox view={v} me={mySeat.id} act={act} pending={pending} />}
{mySeat && v.handPhase === 'open' && mySeat.opening === true && <p className="small muted sd-help">공개패를 골랐어요. 다른 사람을 기다리는 중이에요.</p>}
{v.reveal?.mine && <RevealBox view={v} act={act} pending={pending} />}
{v.reveal && !v.reveal.mine && <p className="small muted sd-help">{nick(players, v.reveal.by)}님이 카드 공개 여부를 고르는 중이에요.</p>}
{mySeat && v.handPhase === 'choose' && mySeat.chosen === false && <ChooseBox view={v} me={mySeat.id} act={act} pending={pending} />}
{mySeat && v.handPhase === 'choose' && mySeat.chosen === true && <p className="small muted sd-help">골랐어요. 다른 사람이 고르기를 기다리는 중이에요.</p>}
{mySeat && mySeat.inHand && v.handPhase === 'betting' && !mySeat.folded && <BetBar view={v} me={mySeat.id} act={act} pending={pending} players={players} />}

View File

@@ -96,10 +96,19 @@ test('섯다: 모두 다이 → 판 결과와 [다음 판으로], 다이한 사
state = applyAction('seotda', state, first, { type: 'die' });
expect(helpNow(view(state, first), first, users)).toContain('이번 판은 다이했어요');
state = applyAction('seotda', state, view(state, null).toAct, { type: 'die' });
expect(view(state, null).handPhase).toBe('handEnd');
const t = helpNow(view(state, 'A'), 'A', users);
expect(view(state, null).handPhase).toBe('reveal');
const winner = view(state, null).reveal.by as string;
const loser = ['A', 'B', 'C'].find((p) => p !== winner)!;
expect(helpNow(view(state, winner), winner, users)).toContain('[카드 공개]');
expect(helpNow(view(state, loser), loser, users)).toContain('카드 공개 여부를 고르는 중');
const hidden = applyAction('seotda', state, winner, { type: 'reveal', show: false });
expect(view(hidden, null).handPhase).toBe('handEnd');
const t = helpNow(view(hidden, 'A'), 'A', users);
expect(t).toContain('모두 다이해서');
expect(t).toContain('패는 공개하지 않았어요');
expect(t).toContain('[다음 판으로]');
const shown = applyAction('seotda', state, winner, { type: 'reveal', show: true });
expect(helpNow(view(shown, loser), loser, users)).toContain('패를 공개했어요(');
});
test('섯다: 시작 금액 다시 받기 / 구사 재경기 참가 / 재경기 표시', () => {

View File

@@ -46,7 +46,11 @@ function rematchLine(v: SeotdaView): string {
}
function resultLine(v: SeotdaView, players: Record<string, PublicUser>): string {
if (v.foldWin) return `모두 다이해서 ${who(players, v.foldWin.winner)}이 판돈 ${won(v.foldWin.amount)}을 가져갔어요. 이때는 패를 공개하지 않아요.`;
if (v.foldWin) {
const name = v.seats.find((s) => s.id === v.foldWin!.winner)?.handName;
const shown = v.foldWin.shown ? `패를 공개했어요${name ? `(${name})` : ''}.` : '패는 공개하지 않았어요.';
return `모두 다이해서 ${who(players, v.foldWin.winner)}이 판돈 ${won(v.foldWin.amount)}을 가져갔어요. ${shown}`;
}
if (!v.showdown) return '이번 판이 끝났어요.';
return v.showdown.pots
.map((p) => {
@@ -68,6 +72,7 @@ function waitingLine(v: SeotdaView, players: Record<string, PublicUser>): string
if (v.handPhase === 'choose') return `모두 3장 중 쓸 2장을 몰래 고르는 중이에요. 다 고르면 ${v.street === 1 && v.options.threePick === 'end' ? '패를 공개해요' : '마지막 베팅을 해요'}.`;
if (v.handPhase === 'open') return '모두 받은 2장 중 모두에게 보여 줄 패 1장(공개패)을 고르는 중이에요. 다 고르면 첫 베팅을 해요.';
if (v.handPhase === 'rejoin') return '구사 재경기 전에, 다이했던 사람이 다시 들어올지 고르는 중이에요.';
if (v.handPhase === 'reveal' && v.reveal) return `모두 다이해서 혼자 남은 ${who(players, v.reveal.by)}이 카드 공개 여부를 고르는 중이에요.`;
if (v.handPhase === 'handEnd') return resultLine(v, players);
return '잠시만 기다려 주세요.';
}
@@ -150,6 +155,14 @@ export function helpNow(v: SeotdaView, me: string | null, players: Record<string
'시간이 지나면 낮은 월의 패가 저절로 공개돼요.',
].join('\n');
}
case 'reveal': {
if (!v.reveal?.mine) return `${waitingLine(v, players)} 잠시 기다려 주세요.`;
return [
`다른 사람이 모두 다이해서 판돈 ${won(v.pot)}은 내 거예요.`,
'[카드 공개]를 누르면 모두에게 내 패를 보여 주고, [공개 안 함]을 누르면 아무도 내 패를 못 봐요.',
'시간이 지나면 공개하지 않는 것으로 처리돼요.',
].join('\n');
}
case 'rejoin': {
if (!v.rejoin?.mine) return `${waitingLine(v, players)} 잠시 기다려 주세요.`;
const cost = won(v.rejoin.cost);

View File

@@ -196,7 +196,7 @@ function SeotdaSide({ view: v, me, players, act, pending, deadline }: BoardProps
</span>{' '}
{r.how === 'rematch'
? `재경기로 넘어감 ${formatWon(r.amount)}`
: `${r.winners.map((id) => nick(players, id)).join('·')} ${formatWon(r.amount)}${r.name ? ` · ${r.name}` : ''}${r.how === 'fold' ? ' · 모두 다이' : r.how === 'ttaengjabi' ? ' · 땡잡이' : r.how === 'amhaeng' ? ' · 암행어사' : r.how === 'limit' ? ' · 나눔' : r.how === 'tie' ? ' · 같은 족보 나눔' : ''}`}
: `${r.winners.map((id) => nick(players, id)).join('·')} ${formatWon(r.amount)}${r.name ? ` · ${r.name}` : ''}${r.how === 'fold' ? (r.shown ? ' · 모두 다이 · 패 공개' : ' · 모두 다이') : r.how === 'ttaengjabi' ? ' · 땡잡이' : r.how === 'amhaeng' ? ' · 암행어사' : r.how === 'limit' ? ' · 나눔' : r.how === 'tie' ? ' · 같은 족보 나눔' : ''}`}
</li>
))}
</ol>
@@ -255,6 +255,7 @@ function isMyTurn(v: SeotdaView, me: string | null): boolean {
if (v.handPhase === 'choose') return v.seats.find((s) => s.id === me)?.chosen === false;
if (v.handPhase === 'open') return v.seats.find((s) => s.id === me)?.opening === false;
if (v.handPhase === 'rejoin') return !!v.rejoin?.mine;
if (v.handPhase === 'reveal') return !!v.reveal?.mine;
return false;
}
@@ -269,6 +270,8 @@ function statusText(v: SeotdaView, me: string | null, players: Record<string, Pu
return isMyTurn(v, me) ? '쓸 패 2장을 골라 주세요' : '다른 사람이 패를 고르는 중이에요';
case 'open':
return isMyTurn(v, me) ? '모두에게 보여 줄 패 1장을 골라 주세요' : '다른 사람이 공개할 패를 고르는 중이에요';
case 'reveal':
return v.reveal?.mine ? '모두 다이했어요. 내 패를 공개할지 골라 주세요' : `${nick(players, v.reveal?.by ?? '')}님이 카드 공개 여부를 고르는 중이에요`;
case 'rejoin':
return v.rejoin?.mine ? '구사 재경기에 참가할지 골라 주세요' : '다이한 사람이 재경기 참가를 고르는 중이에요';
case 'handEnd':
@@ -405,7 +408,7 @@ function Options({ value: o, onChange }: OptionsProps<SeotdaOptions>) {
<Field label="재경기 최대 횟수(넘으면 나눠 가짐)">
<Seg value={o.maxRematches} options={[[1, '1번'], [2, '2번'], [3, '3번'], [5, '5번']]} onChange={(maxRematches) => set({ maxRematches })} />
</Field>
<Field label="재참가·리바이 답 시간">
<Field label="재참가·리바이·카드 공개 답 시간">
<Seg value={o.decisionSeconds} options={[[10, '10초'], [15, '15초'], [30, '30초']]} onChange={(decisionSeconds) => set({ decisionSeconds })} />
</Field>
<Field label="족보 도우미">
@@ -450,7 +453,7 @@ function Rules({ options }: { options?: SeotdaOptions }) {
: o?.dealMode === 'twoRounds'
? ' 1장 받고 베팅, 1장 더 받고 베팅한 뒤 남은 사람끼리 패를 공개해요.'
: ' 2장을 한 번에 받고 한 번 베팅한 뒤 남은 사람끼리 패를 공개해요.'}{' '}
모두 다이하고 한 명만 남으면 그 사람이 패를 보여 주지 않고 판돈을 가져가요.
모두 다이하고 한 명만 남으면 그 사람이 판돈을 가져가요. 이때 남은 사람이 패를 모두에게 보여 줄지([카드 공개]) 숨길지([공개 안 함]) 골라요. 시간이 지나면 공개하지 않아요.
</p>
<p>
<strong>베팅</strong>(괄호는 숫자 키): 콜(7) 앞사람만큼, 다이(8) 포기, 삥(4) 기본금만큼, 체크(5) 안 걸고 넘김, 따당(1) 앞사람이 건 돈의 두 배, 하프(0) 맞춘 뒤 판돈의 절반을 더