루미큐브·다빈치 코드·마작 차례 시간 '무제한' 옵션: 무제한이면 타이머·시간 초과 없음(연결 끊김 처리는 그대로)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
EJClaw
2026-10-13 04:10:35 +09:00
parent f12cf12b84
commit f053b8fc6b
10 changed files with 139 additions and 38 deletions

View File

@@ -23,7 +23,7 @@ const hiddenLeft = (row: DavinciTileView[]) => row.filter((t) => !t.revealed).le
function totalMsOf(v: DavinciView): number {
if (v.phase === 'chooseStart') return 15_000;
if ((v.idle[v.current] ?? 0) >= 3) return 5_000;
return v.phase === 'guess' ? v.options.turnSeconds * 1000 : 10_000;
return v.phase === 'guess' ? (v.options.turnSeconds ?? 30) * 1000 : 10_000;
}
/** Seats starting with the one after `me` (clockwise); spectators see everyone. */
@@ -864,7 +864,12 @@ function Options({ value: o, onChange }: OptionsProps<DavinciOptions>) {
<Seg label="시작 타일 수" value={o.startTiles} options={[['auto', '자동(2·3명 4개, 4명 3개)'], [3, '3개'], [4, '4개'], [5, '5개']]} onChange={(startTiles) => set({ startTiles })} />
</Field>
<Field label="추리 제한 시간">
<Seg label="추리 제한 시간" value={o.turnSeconds} options={[[20, '20초'], [30, '30초'], [45, '45초'], [60, '60초']]} onChange={(turnSeconds) => set({ turnSeconds })} />
<Seg
label="추리 제한 시간"
value={o.turnSeconds === null ? 'none' : String(o.turnSeconds)}
options={[['20', '20초'], ['30', '30초'], ['45', '45초'], ['60', '60초'], ['none', '무제한']]}
onChange={(k) => set({ turnSeconds: k === 'none' ? null : (Number(k) as 20 | 30 | 45 | 60) })}
/>
</Field>
<Field label="가능한 숫자 후보 표시(초보 도움)">
<Seg label="후보 표시" value={o.deductionHelper} options={[[false, '끄기'], [true, '켜기']]} onChange={(deductionHelper) => set({ deductionHelper })} />
@@ -894,7 +899,7 @@ function optionsSummary(o: DavinciOptions): string {
o.jokers ? '조커 사용' : '조커 없음',
o.startTiles === 'auto' ? '시작 타일 자동' : `시작 타일 ${o.startTiles}개`,
o.chooseColors ? '색 골라 가져오기' : '무작위로 가져오기',
`추리 ${o.turnSeconds}초`,
o.turnSeconds === null ? '시간 무제한' : `추리 ${o.turnSeconds}초`,
...(o.tieOrder === 'white-left' ? ['같은 숫자는 흰색 먼저'] : []),
...(o.deductionHelper ? ['후보 표시'] : []),
].join(' · ');
@@ -942,7 +947,10 @@ function Rules({ options }: { options?: DavinciOptions }) {
이미 공개된 같은 색·같은 숫자를 말하는 것처럼 말이 안 되는 추리도 할 수는 있어요(화면에서 알려 줘요). 오른쪽 <strong>추리 기록</strong>에서 누가 어떤 숫자를 말했는지 다시 볼 수 있어요.
</p>
<p className="muted">
시간 안에 추리하지 않으면 공개된 정보로 가장 가능성 있는 작은 숫자를 자동으로 말해요. 세 번 연속 시간을 넘기면 제한 시간이 5초로 줄어요. 결과 화면에는 각자 맞힌 횟수와 추리 횟수가 나와요.
{o?.turnSeconds === null
? '시간 제한이 없어서 천천히 생각해도 돼요. 연결이 끊긴 채로 오래 지나면 공개된 정보로 가장 가능성 있는 작은 숫자를 자동으로 말해요.'
: '시간 안에 추리하지 않으면 공개된 정보로 가장 가능성 있는 작은 숫자를 자동으로 말해요. 세 번 연속 시간을 넘기면 제한 시간이 5초로 줄어요.'}{' '}
결과 화면에는 각자 맞힌 횟수와 추리 횟수가 나와요.
</p>
</div>
);