카드 게임 시간 무제한(우노·뱅!·달무티·고스톱·도둑잡기·포커·바퀴벌레 포커·99), 공통 카드 움직임(card-fx), 우노·달무티·도둑잡기·포커 소리·애니메이션
- 무제한(null): 차례 시계·타임아웃 없음, 자리 비움만 짧은 시계, 연결 끊김은 방 유예 뒤 자동 행동 그대로 - 포커는 리바이 고르는 시간도 무제한 가능, 고스톱은 고·스톱 선택 시간도 무제한 가능, 뱅!은 반응 시간·캐릭터 고르기도 - card-fx: 날아가는 카드·칩(ghost), 제자리 날아오기, 배너, view 변화 감지 훅(처음 렌더·다시 보기는 건너뜀) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1053,7 +1053,7 @@ describe('시간 초과·자리 비움·나가기 (§8.5)', () => {
|
||||
const c = pool();
|
||||
const g = c('gatling');
|
||||
let s = rig({ players: basic({ A: { hand: [g] }, B: { life: 1, hand: [c('beer')] } }) });
|
||||
const before = s.turn.deadline;
|
||||
const before = s.turn.deadline!;
|
||||
s = play(s, 'A', g);
|
||||
const paused = clock;
|
||||
s = act(s, 'B', { type: 'takeHit' });
|
||||
@@ -1083,7 +1083,7 @@ describe('시간 초과·자리 비움·나가기 (§8.5)', () => {
|
||||
// Next time it is A's turn the limit is 5 s.
|
||||
for (const p of ['B', 'C', 'D']) x = act(x, p, { type: 'timeout' });
|
||||
expect(x.turn.player).toBe('A');
|
||||
expect(x.turn.deadline - clock).toBe(5000);
|
||||
expect(x.turn.deadline! - clock).toBe(5000);
|
||||
x = act(x, 'A', { type: 'endPlay' });
|
||||
expect(pl(x, 'A').away).toBe(false);
|
||||
});
|
||||
@@ -1111,6 +1111,73 @@ describe('시간 초과·자리 비움·나가기 (§8.5)', () => {
|
||||
expect(s.reactions.map((r) => (r.kind === 'indians' ? r.target : ''))).toEqual(['B', 'D']);
|
||||
});
|
||||
|
||||
test('무제한 (turnSeconds·reactionSeconds null): 시계 없음, 연결이 끊긴 사람은 여전히 자동 처리, 자리 비움은 5초', () => {
|
||||
const shape = (bang.optionsSchema as unknown as { shape: Record<string, { meta(): { labels?: Record<string, string> } | undefined }> }).shape;
|
||||
expect(shape.turnSeconds!.meta()?.labels?.null).toBe('무제한');
|
||||
expect(shape.reactionSeconds!.meta()?.labels?.null).toBe('무제한');
|
||||
expect(bang.optionsSchema.safeParse({ turnSeconds: null, reactionSeconds: null }).success).toBe(true);
|
||||
expect(bang.defaultOptions).toMatchObject({ turnSeconds: 60, reactionSeconds: 15 });
|
||||
const options = { turnSeconds: null, reactionSeconds: null };
|
||||
const c = pool();
|
||||
const ind = c('indians');
|
||||
const bg = c('bang');
|
||||
let s = rig({ players: basic({ A: { hand: [ind, bg, c('mustang'), c('scope'), c('barrel'), c('jail'), c('volcanic'), c('beer'), c('beer')] }, C: { hand: [c('bang')] } }), options });
|
||||
s.turn.deadline = null;
|
||||
expect(bang.deadline!(s)).toBeNull();
|
||||
expect(bang.timeoutPlayers!(s)).toEqual(['A']);
|
||||
expect(bang.view(s, 'A')).toMatchObject({ turnDeadline: null, deadlineTotalMs: 5000, reactionTotalMs: 5000 });
|
||||
// 인디언: every reaction is unclocked, so every responder is listed (the room's disconnect grace times each one out).
|
||||
s = play(s, 'A', ind);
|
||||
expect(s.reactions.map((r) => r.deadline)).toEqual([null, null, null]);
|
||||
expect(bang.deadline!(s)).toBeNull();
|
||||
expect(bang.timeoutPlayers!(s).sort()).toEqual(['B', 'C', 'D']);
|
||||
expect(bang.view(s, 'B').reactions.every((r) => r.deadline === null)).toBe(true);
|
||||
expect(JSON.parse(JSON.stringify(s))).toEqual(s);
|
||||
s = act(s, 'C', { type: 'timeout' });
|
||||
expect(s.log.some((e) => e.t === 'respond' && e.p === 'C' && e.why === 'indians')).toBe(true);
|
||||
s = act(s, 'B', { type: 'timeout' });
|
||||
expect(pl(s, 'B').life).toBe(pl(s, 'B').maxLife - 1);
|
||||
s = act(s, 'D', { type: 'takeHit' });
|
||||
// The turn clock stays off after the reactions (pause arithmetic skips null).
|
||||
expect(s.reactions).toEqual([]);
|
||||
expect(s.turn).toMatchObject({ deadline: null, pausedAt: null });
|
||||
// 뱅! at an away player: only that reaction has a clock (5 s), so only they are timed.
|
||||
pl(s, 'B').away = true;
|
||||
s = play(s, 'A', bg, { target: 'B' });
|
||||
expect(s.reactions[0]!.deadline).toBe(clock + 5000);
|
||||
expect(bang.deadline!(s)).toBe(clock + 5000);
|
||||
expect(bang.timeoutPlayers!(s)).toEqual(['B']);
|
||||
s = act(s, 'B', { type: 'timeout' });
|
||||
// Hand over the limit → discard phase, still unclocked; a timeout discards at random.
|
||||
s = act(s, 'A', { type: 'endPlay' });
|
||||
expect(s.turn).toMatchObject({ phase: 'discard', deadline: null });
|
||||
s = act(s, 'A', { type: 'timeout' });
|
||||
expect(s.turn.player).toBe('B');
|
||||
// B is away → the short clock on its own turn; C (not away) gets no clock.
|
||||
expect(s.turn.deadline! - clock).toBe(5000);
|
||||
expect(bang.deadline!(s)).toBe(s.turn.deadline);
|
||||
s = act(s, 'B', { type: 'timeout' });
|
||||
expect(s.turn.player).toBe('C');
|
||||
expect(s.turn.deadline).toBeNull();
|
||||
});
|
||||
|
||||
test('무제한: choose2 캐릭터 고르기도 시계 없음, 시간 초과(연결 끊김) 시 첫 번째 카드', () => {
|
||||
const players = ['A', 'B', 'C', 'D'];
|
||||
let s = bang.setup({ players, options: bang.optionsSchema.parse({ characterDraft: 'choose2', turnSeconds: null }), rng: SeededRng.fromSeed(seedN(5)), now: 0 });
|
||||
expect(s.reactions.every((r) => r.kind === 'choose2' && r.deadline === null)).toBe(true);
|
||||
expect(bang.deadline!(s)).toBeNull();
|
||||
expect(bang.timeoutPlayers!(s).sort()).toEqual(players);
|
||||
const offer = pl(s, 'B').characterOffer!;
|
||||
s = act(s, 'B', { type: 'timeout' });
|
||||
expect(pl(s, 'B').character).toBe(offer[0]!);
|
||||
for (const p of ['A', 'C', 'D']) s = act(s, p, { type: 'timeout' });
|
||||
expect(s.turn.phase).not.toBe('draft');
|
||||
expect(s.turn.deadline).toBeNull();
|
||||
// Timed draft keeps its 30 s clock.
|
||||
const t = bang.setup({ players, options: bang.optionsSchema.parse({ characterDraft: 'choose2' }), rng: SeededRng.fromSeed(seedN(5)), now: 0 });
|
||||
expect(bang.deadline!(t)).toBe(30_000);
|
||||
});
|
||||
|
||||
test('onTimeout은 모든 상태에서 합법 행동', () => {
|
||||
for (let seed = 1; seed <= 40; seed++) {
|
||||
const players = ['A', 'B', 'C', 'D', 'E'];
|
||||
@@ -1261,6 +1328,7 @@ const PRESETS: Partial<BangOptions>[] = [
|
||||
{ autoDefend: false, drawBeforeDeath: true },
|
||||
{ beerAtFullHealth: true, selfTargetCatBalou: true, deputyCount7: true },
|
||||
{ characterDraft: 'choose2', autoBarrel: false, autoDefend: false, reactionSeconds: 8 },
|
||||
{ characterDraft: 'choose2', turnSeconds: null, reactionSeconds: null },
|
||||
];
|
||||
|
||||
const SEEDS = playoutSeeds(1000);
|
||||
@@ -1297,6 +1365,7 @@ describe(`무작위 대국 (시드 ${SEEDS}개, 4~7명)`, () => {
|
||||
[5, { characterDraft: 'choose2' }],
|
||||
[6, { autoBarrel: false }],
|
||||
[7, { drawBeforeDeath: true }],
|
||||
[5, { turnSeconds: null, reactionSeconds: null, characterDraft: 'choose2' }],
|
||||
] as const)('randomPlayout with the engine per-step leak / round-trip checks: %i players', (n, opts) => {
|
||||
const players = Array.from({ length: n }, (_, k) => `P${k}`);
|
||||
const options = bang.optionsSchema.parse(opts);
|
||||
|
||||
@@ -71,12 +71,15 @@ export function clockwiseFrom(s: BangState, from: PlayerId): PlayerId[] {
|
||||
return out;
|
||||
}
|
||||
|
||||
export function reactionMs(s: BangState, p: PlayerState): number {
|
||||
return p.away ? AWAY_MS : s.options.reactionSeconds * 1000;
|
||||
/** Clock lengths in ms; null = 무제한 (an away player still gets the short clock). */
|
||||
export function reactionMs(s: BangState, p: PlayerState): number | null {
|
||||
return p.away ? AWAY_MS : s.options.reactionSeconds === null ? null : s.options.reactionSeconds * 1000;
|
||||
}
|
||||
export function turnMs(s: BangState, p: PlayerState): number {
|
||||
return p.away ? AWAY_MS : s.options.turnSeconds * 1000;
|
||||
export function turnMs(s: BangState, p: PlayerState): number | null {
|
||||
return p.away ? AWAY_MS : s.options.turnSeconds === null ? null : s.options.turnSeconds * 1000;
|
||||
}
|
||||
/** Absolute deadline `ms` from now; null stays null (never Infinity — state is JSON). */
|
||||
export const after = (ctx: Ctx, ms: number | null): number | null => (ms === null ? null : ctx.now + ms);
|
||||
|
||||
/** Cards kept inside reactions (general store, Kit Carlson) — counted for conservation. */
|
||||
export function limboCards(s: BangState): string[] {
|
||||
@@ -211,7 +214,7 @@ export function maxRecovery(s: BangState, p: PlayerState): number {
|
||||
|
||||
function openDying(s: BangState, ctx: Ctx, t: PlayerState, killer: PlayerId | null, lost: number): void {
|
||||
if (maxRecovery(s, t) >= 1 - t.life) {
|
||||
s.reactions.push({ kind: 'dying', player: t.id, killer, lost, source: killer, deadline: ctx.now + reactionMs(s, t) });
|
||||
s.reactions.push({ kind: 'dying', player: t.id, killer, lost, source: killer, deadline: after(ctx, reactionMs(s, t)) });
|
||||
} else {
|
||||
eliminate(s, ctx, t.id, killer);
|
||||
}
|
||||
@@ -351,7 +354,7 @@ function finish(s: BangState, ctx: Ctx, team: Team): void {
|
||||
export function startTurn(s: BangState, ctx: Ctx, id: PlayerId): void {
|
||||
const p = P(s, id);
|
||||
if (p.role === 'sheriff') s.round += 1;
|
||||
s.turn = { player: id, phase: 'start', bangsPlayed: 0, deadline: ctx.now + turnMs(s, p), pausedAt: null, dynamiteChecked: false, jailChecked: false };
|
||||
s.turn = { player: id, phase: 'start', bangsPlayed: 0, deadline: after(ctx, turnMs(s, p)), pausedAt: null, dynamiteChecked: false, jailChecked: false };
|
||||
log(s, ctx, { t: 'turn', p: id, round: s.round });
|
||||
}
|
||||
|
||||
@@ -428,7 +431,7 @@ export function doDraw(s: BangState, ctx: Ctx, a: { jesseFrom?: PlayerId; pedroD
|
||||
p.hand.push(...options);
|
||||
if (options.length) log(s, ctx, { t: 'draw', p: p.id, n: options.length, why: 'kit' });
|
||||
} else {
|
||||
s.reactions.push({ kind: 'kitKeep', player: p.id, options, deadline: ctx.now + reactionMs(s, p) });
|
||||
s.reactions.push({ kind: 'kitKeep', player: p.id, options, deadline: after(ctx, reactionMs(s, p)) });
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -471,7 +474,7 @@ export function settle(s: BangState, ctx: Ctx): void {
|
||||
return;
|
||||
}
|
||||
if (s.turn.pausedAt !== null) {
|
||||
s.turn.deadline += ctx.now - s.turn.pausedAt;
|
||||
if (s.turn.deadline !== null) s.turn.deadline += ctx.now - s.turn.pausedAt;
|
||||
s.turn.pausedAt = null;
|
||||
}
|
||||
const p = P(s, s.turn.player);
|
||||
@@ -514,7 +517,7 @@ function openBang(s: BangState, ctx: Ctx, source: PlayerId, target: PlayerId, vi
|
||||
needed: via === 'bang' && is(P(s, source), 'slab') ? 2 : 1,
|
||||
barrelTried: false,
|
||||
jourTried: false,
|
||||
deadline: ctx.now + reactionMs(s, t),
|
||||
deadline: after(ctx, reactionMs(s, t)),
|
||||
};
|
||||
if (s.options.autoBarrel) {
|
||||
while (r.needed > 0 && tryBarrel(s, ctx, r));
|
||||
@@ -582,7 +585,7 @@ export function storeAdvance(s: BangState, ctx: Ctx, r: Extract<Reaction, { kind
|
||||
continue;
|
||||
}
|
||||
r.picker = next;
|
||||
r.deadline = ctx.now + reactionMs(s, p);
|
||||
r.deadline = after(ctx, reactionMs(s, p));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -661,13 +664,13 @@ export function playCard(s: BangState, ctx: Ctx, actor: PlayerId, a: PlayAction)
|
||||
}
|
||||
case 'duel': {
|
||||
const t = P(s, a.target!);
|
||||
s.reactions.push({ kind: 'duel', actor: t.id, other: actor, source: actor, deadline: ctx.now + reactionMs(s, t) });
|
||||
s.reactions.push({ kind: 'duel', actor: t.id, other: actor, source: actor, deadline: after(ctx, reactionMs(s, t)) });
|
||||
break;
|
||||
}
|
||||
case 'indians':
|
||||
for (const id of clockwiseFrom(s, actor)) {
|
||||
if (id === actor) continue;
|
||||
s.reactions.push({ kind: 'indians', target: id, source: actor, deadline: ctx.now + reactionMs(s, P(s, id)) });
|
||||
s.reactions.push({ kind: 'indians', target: id, source: actor, deadline: after(ctx, reactionMs(s, P(s, id))) });
|
||||
}
|
||||
break;
|
||||
case 'gatling':
|
||||
@@ -700,7 +703,7 @@ export function respond(s: BangState, ctx: Ctx, actor: PlayerId, cardIds: string
|
||||
const next = r.other;
|
||||
r.other = r.actor;
|
||||
r.actor = next;
|
||||
r.deadline = ctx.now + reactionMs(s, P(s, next));
|
||||
r.deadline = after(ctx, reactionMs(s, P(s, next)));
|
||||
break;
|
||||
}
|
||||
case 'dying':
|
||||
@@ -793,7 +796,7 @@ export function endPlay(s: BangState, ctx: Ctx, actor: PlayerId): void {
|
||||
const p = P(s, actor);
|
||||
if (p.hand.length > p.life) {
|
||||
s.turn.phase = 'discard';
|
||||
s.turn.deadline = Math.max(s.turn.deadline, ctx.now + DISCARD_MIN_MS);
|
||||
if (s.turn.deadline !== null) s.turn.deadline = Math.max(s.turn.deadline, ctx.now + DISCARD_MIN_MS);
|
||||
} else s.turn.phase = 'ended';
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import { CARDS, CHARACTER_IDS, CHARACTER_LIFE, cardById, kindOf, rolesFor } from
|
||||
import { distance, rangeOf } from './distance';
|
||||
import {
|
||||
AWAY_AFTER,
|
||||
AWAY_MS,
|
||||
P,
|
||||
autoSave,
|
||||
discardDown,
|
||||
@@ -71,17 +72,24 @@ export function allCards(s: BangState): string[] {
|
||||
return [...s.deck, ...s.discard, ...s.players.flatMap((p) => [...p.hand, ...p.inPlay]), ...limboCards(s)];
|
||||
}
|
||||
|
||||
/** Earliest clock; reactions with no clock (무제한) are skipped, null when nothing is timed. */
|
||||
function deadlineOf(s: BangState): number | null {
|
||||
if (s.winner) return null;
|
||||
if (s.reactions.length) return Math.min(...s.reactions.map((r) => r.deadline));
|
||||
if (s.reactions.length) {
|
||||
const ds = s.reactions.flatMap((r) => (r.deadline === null ? [] : [r.deadline]));
|
||||
return ds.length ? Math.min(...ds) : null;
|
||||
}
|
||||
return s.turn.deadline;
|
||||
}
|
||||
|
||||
/** Responders whose own deadline is the earliest (a later reaction must not be cut short). */
|
||||
/**
|
||||
* Responders whose own deadline is the earliest (a later reaction must not be cut short).
|
||||
* When no reaction has a clock (무제한), every responder is listed so the room's disconnect grace can still time each one out.
|
||||
*/
|
||||
function timed(s: BangState): PlayerId[] {
|
||||
if (s.winner) return [];
|
||||
if (!s.reactions.length) return [s.turn.player];
|
||||
const d = deadlineOf(s)!;
|
||||
const d = deadlineOf(s);
|
||||
return [...new Set(s.reactions.filter((r) => r.deadline === d).map(responder))];
|
||||
}
|
||||
|
||||
@@ -178,7 +186,8 @@ export const bang: Def = {
|
||||
deck: rng.shuffle(CARDS.map((c) => c.id)),
|
||||
discard: [],
|
||||
turn: { player: ps.find((p) => p.role === 'sheriff')!.id, phase: 'draft', bangsPlayed: 0, deadline: now, pausedAt: null, dynamiteChecked: false, jailChecked: false },
|
||||
reactions: draft ? ps.map((p) => ({ kind: 'choose2' as const, player: p.id, deadline: now + 30_000 })) : [],
|
||||
// The draft pick has its own 30 s clock, none when the turn clock is 무제한.
|
||||
reactions: draft ? ps.map((p) => ({ kind: 'choose2' as const, player: p.id, deadline: options.turnSeconds === null ? null : now + 30_000 })) : [],
|
||||
lastCheck: null,
|
||||
winner: null,
|
||||
deathOrder: [],
|
||||
@@ -318,8 +327,9 @@ export const bang: Def = {
|
||||
}
|
||||
: null,
|
||||
turnDeadline: s.turn.deadline,
|
||||
deadlineTotalMs: s.options.turnSeconds * 1000,
|
||||
reactionTotalMs: s.options.reactionSeconds * 1000,
|
||||
// 무제한: only an away player's short clock can run, so the ring is sized for it.
|
||||
deadlineTotalMs: s.options.turnSeconds === null ? AWAY_MS : s.options.turnSeconds * 1000,
|
||||
reactionTotalMs: s.options.reactionSeconds === null ? AWAY_MS : s.options.reactionSeconds * 1000,
|
||||
log: s.log.slice(-LOG_VIEW).map((e) => stripPrivate(e, me, over)),
|
||||
winner: s.winner,
|
||||
result: s.final,
|
||||
|
||||
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
||||
import type { PlayerId } from '@bg/engine';
|
||||
import { CHARACTER_IDS, type Card, type CardFace, type CardKind, type CharacterId, type Role } from './cards';
|
||||
|
||||
const lit = <T extends number>(...vals: T[]) =>
|
||||
const lit = <T extends number | null>(...vals: T[]) =>
|
||||
z.union(vals.map((v) => z.literal(v)) as unknown as [z.ZodLiteral<T>, z.ZodLiteral<T>, ...z.ZodLiteral<T>[]]);
|
||||
|
||||
export const bangOptionsSchema = z.object({
|
||||
@@ -11,12 +11,14 @@ export const bangOptionsSchema = z.object({
|
||||
.enum(['random', 'choose2'])
|
||||
.default('random')
|
||||
.meta({ title: '캐릭터 정하기', labels: { random: '무작위 1장', choose2: '2장 중 1장 고르기' } }),
|
||||
turnSeconds: lit(30, 60, 90, 120)
|
||||
/** null = 무제한 (also for the choose2 draft pick). A dropped connection still gets auto moves after the room's grace time. */
|
||||
turnSeconds: lit(30, 60, 90, 120, null)
|
||||
.default(60)
|
||||
.meta({ title: '내 턴 제한 시간', labels: { 30: '30초', 60: '60초', 90: '90초', 120: '120초' } }),
|
||||
reactionSeconds: lit(8, 15, 25)
|
||||
.meta({ title: '내 턴 제한 시간', labels: { 30: '30초', 60: '60초', 90: '90초', 120: '120초', null: '무제한' } }),
|
||||
/** null = 무제한 (away players still get the short clock). */
|
||||
reactionSeconds: lit(8, 15, 25, null)
|
||||
.default(15)
|
||||
.meta({ title: '반응 제한 시간(빗나감!·맥주·결투·잡화점)', labels: { 8: '8초', 15: '15초', 25: '25초' } }),
|
||||
.meta({ title: '반응 제한 시간(빗나감!·맥주·결투·잡화점)', labels: { 8: '8초', 15: '15초', 25: '25초', null: '무제한' } }),
|
||||
autoDefend: z.boolean().default(true).meta({ title: '반응 시간이 지나면 막을 카드를 자동으로 내기' }),
|
||||
autoBarrel: z.boolean().default(true).meta({ title: '술통·주르도네 판정을 묻지 않고 자동으로 하기' }),
|
||||
showDistanceHelper: z.boolean().default(true).meta({ title: '다른 사람까지 거리와 사거리 표시' }),
|
||||
@@ -70,15 +72,16 @@ export interface PlayerState {
|
||||
away: boolean;
|
||||
}
|
||||
|
||||
/** `deadline: null` = 무제한 (no clock; only the room's disconnect grace applies). Never Infinity (state is JSON). */
|
||||
export type Reaction =
|
||||
| { kind: 'bang'; target: PlayerId; source: PlayerId; via: 'bang' | 'gatling'; needed: number; barrelTried: boolean; jourTried: boolean; deadline: number }
|
||||
| { kind: 'indians'; target: PlayerId; source: PlayerId; deadline: number }
|
||||
| { kind: 'duel'; actor: PlayerId; other: PlayerId; source: PlayerId; deadline: number }
|
||||
| { kind: 'store'; picker: PlayerId; order: PlayerId[]; revealed: string[]; source: PlayerId; deadline: number }
|
||||
| { kind: 'bang'; target: PlayerId; source: PlayerId; via: 'bang' | 'gatling'; needed: number; barrelTried: boolean; jourTried: boolean; deadline: number | null }
|
||||
| { kind: 'indians'; target: PlayerId; source: PlayerId; deadline: number | null }
|
||||
| { kind: 'duel'; actor: PlayerId; other: PlayerId; source: PlayerId; deadline: number | null }
|
||||
| { kind: 'store'; picker: PlayerId; order: PlayerId[]; revealed: string[]; source: PlayerId; deadline: number | null }
|
||||
/** `lost` / `source`: the life loss that caused it (Bart / El Gringo trigger after surviving, §5.5). */
|
||||
| { kind: 'dying'; player: PlayerId; killer: PlayerId | null; lost: number; source: PlayerId | null; deadline: number }
|
||||
| { kind: 'kitKeep'; player: PlayerId; options: string[]; deadline: number }
|
||||
| { kind: 'choose2'; player: PlayerId; deadline: number };
|
||||
| { kind: 'dying'; player: PlayerId; killer: PlayerId | null; lost: number; source: PlayerId | null; deadline: number | null }
|
||||
| { kind: 'kitKeep'; player: PlayerId; options: string[]; deadline: number | null }
|
||||
| { kind: 'choose2'; player: PlayerId; deadline: number | null };
|
||||
export type ReactionKind = Reaction['kind'];
|
||||
|
||||
export type TurnPhase = 'draft' | 'start' | 'draw' | 'play' | 'discard' | 'ended';
|
||||
@@ -87,7 +90,8 @@ export interface TurnState {
|
||||
player: PlayerId;
|
||||
phase: TurnPhase;
|
||||
bangsPlayed: number;
|
||||
deadline: number;
|
||||
/** null = 무제한. */
|
||||
deadline: number | null;
|
||||
/** Turn timer is paused while reactions run during the play phase. */
|
||||
pausedAt: number | null;
|
||||
dynamiteChecked: boolean;
|
||||
@@ -217,7 +221,7 @@ export interface ReactionView {
|
||||
via?: 'bang' | 'gatling';
|
||||
needed?: number;
|
||||
revealed?: Card[];
|
||||
deadline: number;
|
||||
deadline: number | null;
|
||||
}
|
||||
|
||||
export interface BangView {
|
||||
@@ -246,7 +250,9 @@ export interface BangView {
|
||||
canSidHeal: boolean;
|
||||
prompt: Prompt | null;
|
||||
} | null;
|
||||
turnDeadline: number;
|
||||
/** null = 무제한 (no clock shown). */
|
||||
turnDeadline: number | null;
|
||||
/** Full clock lengths for the timer ring (the short away clock when the option is 무제한). */
|
||||
deadlineTotalMs: number;
|
||||
reactionTotalMs: number;
|
||||
log: LogEntry[];
|
||||
|
||||
Reference in New Issue
Block a user