@@ -527,36 +527,24 @@ function SettingsForm({ room, ui, inline, onDone }: { room: RoomView; ui: GameUI
return (
{room.lockedOptions.length > 0 &&
🔒 관리자가 고정한 규칙은 바꿔도 저장되지 않아요.
}
-
+
바꾸면 바로 적용돼요.
+
-
-
-
방 공개
- {room.seats.some((s) => s && isBotId(s.user.id)) ? (
-
컴퓨터가 있는 방은 친구만 들어와요.
- ) : (
- seg(visibility === 'public', (v) => setVisibility(v ? 'public' : 'private'), '누구나', '친구만')
- )}
-
+
관전
- {seg(allowSpectators, setAllowSpectators, '허용', '안 됨')}
+ {seg(room.allowSpectators, (allowSpectators) => socket.send({ t: 'config', allowSpectators }), '허용', '안 됨')}
채팅
- {seg(chatEnabled, setChatEnabled, '켜기', '끄기')}
+ {seg(room.chatEnabled, (chatEnabled) => socket.send({ t: 'config', chatEnabled }), '켜기', '끄기')}
-
-
+ )}
);
}
diff --git a/apps/web/src/styles/global.css b/apps/web/src/styles/global.css
index 9f56af5..5a577e1 100644
--- a/apps/web/src/styles/global.css
+++ b/apps/web/src/styles/global.css
@@ -1182,32 +1182,6 @@ button.header-user {
padding: 16px;
}
}
-.home-tabs {
- display: flex;
- gap: 4px;
- border-bottom: 2px solid var(--border);
-}
-.home-tabs button {
- display: inline-flex;
- align-items: center;
- gap: 8px;
- min-height: var(--tap);
- padding: 0 18px;
- margin-bottom: -2px;
- border: 0;
- border-bottom: 3px solid transparent;
- background: transparent;
- color: var(--text-sub);
- font: inherit;
- font-size: 1.1rem;
- font-weight: 700;
- cursor: pointer;
-}
-.home-tabs button[aria-selected='true'] {
- color: var(--primary);
- border-bottom-color: var(--primary);
-}
-
/* Login page (docs/07 §3.2): big Discord button, guest below */
.btn-discord {
min-height: 68px;
diff --git a/docs/00-overview.md b/docs/00-overview.md
index 68e3ceb..afb5876 100644
--- a/docs/00-overview.md
+++ b/docs/00-overview.md
@@ -19,7 +19,7 @@
- 게임: 사용자가 지정한 포커(여러 모드), 마작, 오목, 바둑, 체스, 뱅, 섯다(여러 모드) + 한국에서 인기 있는 보드게임. 전체 목록과 순서는 `games/README.md`.
- 인원: 각 게임의 원래 최소/최대 인원을 그대로 따른다.
- 계정: 디스코드 로그인 또는 닉네임만 정하는 게스트. 디스코드 로그인 사용자도 닉네임을 바꿀 수 있다.
-- 방: 6자리 숫자 코드, 초대 링크, 코드/링크 복사, QR, 모바일 공유 시트, 빠른 시작, 관전, 재접속.
+- 방: 6자리 숫자 코드, 초대 링크, 코드/링크 복사, QR, 모바일 공유 시트, 관전, 재접속.
- 기기: **PC 우선**(사용자 결정, 2026-10-04). 태블릿·휴대폰도 같은 화면을 접어서 지원. 최신 Chrome/Edge/Safari/Firefox/Samsung Internet.
## 5. 범위 밖 (Non-goals)
diff --git a/docs/06-lobby-rooms.md b/docs/06-lobby-rooms.md
index 6b14ce3..2504c6c 100644
--- a/docs/06-lobby-rooms.md
+++ b/docs/06-lobby-rooms.md
@@ -9,7 +9,7 @@
| 주소 | 화면 |
|---|---|
| `/` | 홈: 위쪽에 큰 버튼 두 개 **[방 만들기] [코드로 참여]**, 그 아래 "진행 중인 게임으로 돌아가기"(있을 때만), 그 아래 게임 카드 목록 |
-| `/g/:gameId` | 게임 소개: 한 줄 설명, 인원, 시간, 난이도, **[방 만들기] [빠른 시작] [규칙 보기]**, 열린 공개 방 목록 |
+| `/g/:gameId` | 게임 소개: 한 줄 설명, 인원, 시간, 난이도, **[방 만들기] [컴퓨터와 연습하기] [규칙 보기]** |
| `/r/:code` | 방(대기실 ↔ 게임 화면 ↔ 결과 화면이 같은 주소에서 전환) |
| `/j` | 코드 입력 전용 화면(숫자 키패드) |
| `/me` | 계정 |
@@ -26,7 +26,8 @@
## 4. 방 만들기
1. 게임 선택(홈 카드 또는 홈의 [방 만들기] → 게임 고르기 화면).
2. 바로 대기실 생성. 모든 옵션은 **기본값으로 이미 정해져 있다**(인원은 게임 기본 인원, 공개 여부는 "친구만(비공개)").
-3. 대기실에서 방장이 바꿀 수 있는 것: 게임 모드/옵션(시간 제한 포함 — 게임마다 다름), 최대 인원(게임의 최소~최대 범위 안), 공개/비공개, 관전 허용, 채팅 허용.
+3. 대기실에서 방장이 바꿀 수 있는 것: 게임 모드/옵션(시간 제한 포함 — 게임마다 다름), 최대 인원(게임의 최소~최대 범위 안), 관전 허용, 채팅 허용. 바꾸는 즉시 서버에 저장된다(저장 버튼 없음). 그래서 [게임 시작]은 언제나 화면에 보이는 설정으로 시작한다.
+ - 방은 모두 친구만(비공개)이다. 아는 사람끼리만 하므로 공개 설정은 화면에 두지 않는다.
4. 옵션은 "기본 설정" 몇 개만 보이고 나머지는 "자세한 설정" 접기 안에 둔다.
## 5. 대기실 화면 (PC는 두 칸 배치 — `07-ui-ux.md` 3.4. 아래는 내용 순서이며 좁은 화면에서는 이 순서로 한 칸에 쌓인다)
@@ -51,9 +52,8 @@
3. 입장 → 빈자리가 있으면 **자동으로 자리에 앉는다**. 없으면 관전자로 들어가고 "자리가 나면 앉을 수 있어요".
4. 방이 없거나 끝났으면: "이 방은 끝났어요" + [같은 게임 새 방 만들기] [홈으로].
-## 7. 빠른 시작
-- 게임 상세의 [빠른 시작]: 같은 게임의 공개 대기실 중 사람이 가장 많은(가득 차지 않은) 방에 들어간다. 없으면 공개 방을 새로 만들고 기다린다.
-- 기다리는 동안 "다른 사람을 기다리는 중… (공개 방)" + [친구 초대하기] 버튼.
+## 7. 빠른 시작 (화면에서 뺌)
+- 아는 사람끼리만 하므로 [빠른 시작](모르는 사람 기다리기)은 화면에서 뺐다. 서버의 `POST /api/quick/:gameId`는 남아 있지만 화면에서 부르지 않는다.
## 8. 게임 중
- 위쪽 상태 줄: 지금 할 일 문장("내 차례예요" / "OO님 차례예요"), 남은 시간 링.
@@ -68,9 +68,8 @@
- [한 판 더]는 투표: 자리에 앉은 사람 모두 누르면 같은 설정으로 즉시 새 게임(선/딜러는 규칙에 따라 교대). 안 누르는 사람이 있으면 그 사람이 [관전하기]로 일어나거나 방장이 [게임 시작]으로 바로 시작할 수 있다.
- 기록: 끝난 게임은 `game_results`에 저장, 방 안에서 "이번 방 전적"(예: OO 3승 2패) 표시.
-## 10. 공개 방 목록
-- 게임 상세 화면에서만 보인다(홈을 복잡하게 하지 않음). 정렬: 곧 시작할 방(빈자리 1개) 우선.
-- 각 줄: 방 이름(기본 "OO님의 방"), 인원, 모드, [참여].
+## 10. 공개 방 목록 (화면에서 뺌)
+- 홈의 [지금 열린 방] 탭과 게임 상세의 "기다리는 방" 목록은 뺐다. 서버의 `GET /api/public-rooms`, `GET /api/games/:gameId/rooms`는 남아 있지만 화면에서 부르지 않는다.
## 11. 서버 방 모델
```ts
diff --git a/docs/07-ui-ux.md b/docs/07-ui-ux.md
index 97a8ab3..e04891b 100644
--- a/docs/07-ui-ux.md
+++ b/docs/07-ui-ux.md
@@ -66,8 +66,7 @@
│ [▶ 하던 게임으로 돌아가기] (있을 때만) │
│ [+ 방 만들기 (파란 큰 버튼)] [🔢 코드로 참여 → /j] [🤖 컴퓨터와 연습] │
├──────────────────────────────────────────────────────────────────────────┤
-│ [🎮 게임 고르기] [🚪 지금 열린 방 (n)] ← 탭, 한 번에 하나만 보임 │
-│ 게임 카드 격자 (4~5열, 카드에 인원·시간·난이도) 또는 공개 방 목록(게임·인원·참여) │
+│ 게임 카드 격자 (4~5열, 카드에 인원·시간·난이도) │
└──────────────────────────────────────────────────────────────────────────┘
```
- 첫 화면에 다 넣지 않는다. 설명 글은 버튼 아래 한 줄만, 나머지는 탭이나 버튼을 눌러 들어간다.
@@ -157,7 +156,7 @@
- 홈(로그인 전/후, 진행 중 게임 있음)
- 닉네임 입력(게스트 시작 / 링크 입장)
- 코드 입력
-- 게임 상세 + 공개 방 목록
+- 게임 상세
- 대기실(방장/참가자/관전자, 인원 부족/가득 참)
- 게임 화면(내 차례/남의 차례/연결 끊김/자리 비움/일시 정지)
- 결과 화면(승/패/무승부, 한 판 더 투표 중, 처음부터 다시 보기)
diff --git a/docs/README.md b/docs/README.md
index f87c25d..a98825b 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -12,7 +12,7 @@
| [03-realtime-protocol.md](03-realtime-protocol.md) | WebSocket 메시지, 순서 보장, 재접속, 타이머, 제한 |
| [04-stability-security.md](04-stability-security.md) | 저장·복구, 장애 격리, 숨김 정보·공정성, 사행성·상표, 웹 보안 |
| [05-accounts-auth.md](05-accounts-auth.md) | 게스트·디스코드 로그인, 닉네임, 세션, 계정 페이지 |
-| [06-lobby-rooms.md](06-lobby-rooms.md) | 방 만들기/참여, 코드·링크·QR·공유, 대기실, 빠른 시작, 한 판 더 |
+| [06-lobby-rooms.md](06-lobby-rooms.md) | 방 만들기/참여, 코드·링크·QR·공유, 대기실, 한 판 더 |
| [07-ui-ux.md](07-ui-ux.md) | 디자인 원칙, 색·글자 토큰, 화면 틀, 컴포넌트, 접근성, 성능 예산 |
| [08-data-model.md](08-data-model.md) | SQLite 스키마, 쓰기 시점, 정리, 개인정보 |
| [09-game-engine.md](09-game-engine.md) | 게임 모듈 인터페이스, 결정적 난수, GameRunner, 공통 유틸, 공통 테스트 |
diff --git a/docs/games/baduk.md b/docs/games/baduk.md
index 43a19b1..b33e69b 100644
--- a/docs/games/baduk.md
+++ b/docs/games/baduk.md
@@ -21,7 +21,6 @@
| `timeControl.periodSec` | 초읽기 1회 시간 | 10 / 20 / 30 / 60 | 30 |
| `timeControl.periods` | 초읽기 횟수 | 1 ~ 5 | 3 |
| `timeControl.incSec` | `fischer` 수당 추가 | 0 ~ 30 | 10 |
-| `idleLimitSec` | `none`일 때 무응답 한도 | 300 / 600 | 600 |
| `undo` | 무르기 허용 횟수(1인당, 상대 동의) | `off` / `1` / `3` / `unlimited` | `3` |
| `drawOffer` | 무승부(빅) 합의 제안 허용 | `true` / `false` | `true` |
| `atariWarning` | **관리자 전용** 위협 가이드: 단수에 몰린 내 돌 표시(방장은 못 바꿈) | `true` / `false` | `false` |
@@ -202,7 +201,7 @@ interface BadukState {
- `deadline(state)`:
- `playing` + `byoyomi`: `turnStartedAt + mainMs[turn] + periodsLeft[turn] * periodSec*1000` (현재 회차를 다 쓰면 다음 회차가 이어지므로 이 합이 최종 시간패 시각)
- `playing` + `fischer`: `turnStartedAt + mainMs[turn]`
- - `playing` + `none`: `turnStartedAt + idleLimitSec*1000`
+ - `playing` + `none`: `null` — 시간 제한 없음은 정말 마감이 없다(무응답 시간패 없음). 연결이 끊긴 사람만 방의 접속 유예(`graceSec`) 뒤에 처리한다.
- `scoring`: `scoringMarks.startedAt + scoringDeadlineSec*1000`
- `finished`: `null`
- `activePlayers`: `playing`이면 차례인 1명. `scoring`이면 아직 `agreed`하지 않은 플레이어 전원(동시 행동 단계).
diff --git a/docs/games/chess.md b/docs/games/chess.md
index be20af8..5a14e8e 100644
--- a/docs/games/chess.md
+++ b/docs/games/chess.md
@@ -18,8 +18,7 @@
| `autoQueen` | 승진 시 퀸 자동 선택(설정 끄면 선택 창) | `true` / `false` | `false` (선택 창, 퀸이 첫 번째 큰 버튼) |
| `undo` | 무르기 허용 횟수(1인당, 상대 동의) | `off` / `1` / `3` / `unlimited` | `1` |
| `drawOffer` | 무승부 제안 | `true` / `false` | `true` |
-| `firstMoveSec` | 첫 수 제한(넘기면 대국 취소) | 15 / 30 / 60 | 30 |
-| `idleLimitSec` | `timeControl=none`일 때 무응답 한도 | 300 / 600 | 600 |
+| `firstMoveSec` | 첫 수 제한(넘기면 대국 취소, 피셔일 때만) | 15 / 30 / 60 | 30 |
| `hints` | 초보 도움말(이동 가능 칸 표시) | `off` / `moves` | `moves` |
| `threatHints` | **관리자 전용** 위협 가이드: 공격받고 방어 안 된 내 기물 표시(방장은 못 바꿈) | `true` / `false` | `false` |
| `disconnectGraceSec` | 연결 끊김 유예 | 30 / 60 / 120 | 60 |
@@ -154,9 +153,9 @@ interface ChessState {
### 8.5 타이머·시간 초과·연결 끊김 시 자동 행동
- 시계 시작: 각 색의 첫 수는 `firstMoveSec` 제한만 있고 본 시계를 차감하지 않는다(lichess 방식). 백이 첫 수를 두면 흑의 첫 수 제한이 시작되고, 흑이 첫 수를 두면 백의 본 시계가 시작된다.
- `deadline(state)`:
- - 해당 색 첫 수 전: `turnStartedAt + firstMoveSec*1000`
+ - `none`: `null` — 시간 제한 없음은 정말 마감이 없다(무응답 시간패 없음). 연결이 끊긴 사람만 방의 접속 유예(`graceSec`) 뒤에 처리한다. 첫 수 제한도 없다.
+ - 피셔, 해당 색 첫 수 전: `turnStartedAt + firstMoveSec*1000`
- 피셔: `turnStartedAt + remainingMs[turn]`
- - `none`: `turnStartedAt + idleLimitSec*1000`
- 종료: `null`
- `onTimeout(state, player)` → `{ type: 'timeout' }`. `apply`:
- 첫 수 제한 초과 → `aborted`(승패 없음).
diff --git a/docs/games/janggi.md b/docs/games/janggi.md
index 34b8be4..d57a3fc 100644
--- a/docs/games/janggi.md
+++ b/docs/games/janggi.md
@@ -20,7 +20,6 @@
| `moveLimit` | 수 제한(도달 시 점수 판정) | `0`(없음) / 150 / 200 / 250 (양쪽 합산 수) | `0` |
| `timeControl.kind` | 시간 방식 | `none` / `byoyomi` | `byoyomi` |
| `timeControl.mainSec` / `periodSec` / `periods` | 기본 시간 / 초읽기 1회 / 횟수 | 5분·10분·20분 / 20·30·60초 / 1~5회 | 10분 / 30초 / 3회 |
-| `idleLimitSec` | `none`일 때 무응답 한도 | 300 / 600 | 600 |
| `undo` | 무르기 허용 횟수(상대 동의) | `off` / `1` / `3` / `unlimited` | `3` |
| `drawOffer` | 무승부 제안 | `true` / `false` | `true` |
| `hints` | 이동 가능 칸 표시 | `off` / `moves` | `moves` |
@@ -193,7 +192,7 @@ interface JanggiState {
- `deadline(state)`:
- `setup`: 단계 시작 + 60초(선택해야 할 사람 기준).
- `playing` + `byoyomi`: `turnStartedAt + mainMs[turn] + periodsLeft[turn]*periodSec*1000`.
- - `playing` + `none`: `turnStartedAt + idleLimitSec*1000`.
+ - `playing` + `none`: `null` — 시간 제한 없음은 정말 마감이 없다(무응답 시간패 없음). 연결이 끊긴 사람만 방의 접속 유예(`graceSec`) 뒤에 처리한다.
- 종료: `null`.
- `activePlayers`: `setup`에서 `hanFirst`면 순서에 맞는 1명, `simultaneous`면 아직 선택 안 한 전원. `playing`이면 차례인 1명.
- `onTimeout(state, player)`:
diff --git a/docs/games/omok.md b/docs/games/omok.md
index b891fa4..7c5bc0a 100644
--- a/docs/games/omok.md
+++ b/docs/games/omok.md
@@ -20,7 +20,6 @@
| `timeControl.perMoveSec` | 한 수당 제한 (`perMove`) | 10 / 20 / 30 / 60 | 30 |
| `timeControl.baseSec` / `incSec` | 전체 시간 / 수당 추가 (`fischer`) | 기본 3분+2초, 5분+3초, 10분+5초 프리셋 | 5분+3초 |
| `timeoutPolicy` | `perMove`에서 시간 초과 시 처리 | `autoMove`(무작위 합법 수 자동 착수) / `lose`(시간패) | `autoMove` |
-| `idleLimitSec` | `timeControl=none`일 때 무응답 한도 | 120 / 300 / 600 | 300 |
| `undo` | 무르기 요청 허용 횟수(1인당, 상대 동의 필요) | `off` / `1` / `3` / `unlimited` | `3` |
| `drawOffer` | 무승부 제안 허용 | `true` / `false` | `true` |
| `showForbidden` | 금수 자리 표시 (금수 있는 규칙만) | `true` / `false` | `true` |
@@ -266,10 +265,10 @@ interface OmokState {
- `deadline(state)`:
- `perMove`: `turnStartedAt + perMoveSec*1000`
- `fischer`: `turnStartedAt + remainingMs[turn]`
- - `none`: `turnStartedAt + idleLimitSec*1000`
+ - `none`: `null` — 시간 제한 없음은 정말 마감이 없다(무응답 시간패 없음). 연결이 끊긴 사람만 방의 접속 유예(`graceSec`) 뒤에 처리한다.
- `finished`: `null`
- `onTimeout(state, player)`는 항상 `{ type: 'timeout' }`을 반환하고, `apply`가 정책을 적용한다:
- - `fischer` 또는 `none`의 무응답 한도 초과, `perMove + lose`: 해당 플레이어 시간패.
+ - `fischer` 시간 다 씀, `perMove + lose`: 해당 플레이어 시간패.
- `perMove + autoMove`: 8.4 규칙으로 자동 착수(`moves[].auto = true`), `autoMoveStreak +1`. 자동 착수 2번 뒤 세 번째로 연속 시간 초과하면 시간패. 정상 착수 시 streak 0으로 초기화.
- 서버는 연결 끊긴 플레이어의 차례에 `min(deadline, 끊긴 시각 + 방의 graceSec)`에 `onTimeout`을 호출한다(유예 시간은 방 설정, 기본 60초). 끊긴 플레이어의 차례가 아닐 때는 아무것도 하지 않고, 차례가 오면 위 규칙을 따른다.
- 시간 초과 직전에 도착한 `place`는 서버 도착 시각(`ctx.now`) 기준으로 판정한다.
diff --git a/docs/games/othello.md b/docs/games/othello.md
index 4db9d7d..36cbdb9 100644
--- a/docs/games/othello.md
+++ b/docs/games/othello.md
@@ -18,7 +18,6 @@
| `timeControl.perMoveSec` | 한 수당 제한 | 10 / 20 / 30 / 60 | 30 |
| `timeControl.baseSec` / `incSec` | 전체 시간 / 수당 추가 | 3+2, 5+3, 10+5 | 5+3 |
| `timeoutPolicy` | `perMove` 시간 초과 처리 | `autoMove`(무작위 합법 수) / `lose` | `autoMove` |
-| `idleLimitSec` | `none` 무응답 한도 | 120 / 300 / 600 | 300 |
| `undo` | 무르기 허용 횟수(상대 동의) | `off` / `1` / `3` / `unlimited` | `3` |
| `drawOffer` | 무승부 제안 | `true` / `false` | `true` |
| `showLegalMoves` | 둘 수 있는 칸 표시 | `true` / `false` | `true` |
@@ -102,7 +101,7 @@ interface OthelloState {
2. `timeoutPolicy=autoMove`의 자동 착수: 모서리(a1, h1, a8, h8)가 합법이면 그중 무작위, 아니면 전체 합법 수 중 균등 무작위. 모서리 우선은 시간 초과 당한 쪽이 지나치게 불리해지지 않게 하는 최소한의 배려.
### 8.5 타이머·시간 초과·연결 끊김 시 자동 행동
-- `deadline(state)`: `perMove` → `turnStartedAt + perMoveSec*1000`, `fischer` → `turnStartedAt + remainingMs[turn]`, `none` → `turnStartedAt + idleLimitSec*1000`, 종료 → `null`.
+- `deadline(state)`: `perMove` → `turnStartedAt + perMoveSec*1000`, `fischer` → `turnStartedAt + remainingMs[turn]`, `none` → `null`(마감 없음, 무응답 시간패 없음), 종료 → `null`.
- `onTimeout(state, player)` → `{ type: 'timeout' }`. `apply`:
- `perMove + autoMove`: 자동 착수(`auto: true`), streak +1, 3연속이면 시간패.
- 그 외: 시간패.
diff --git a/docs/games/quoridor.md b/docs/games/quoridor.md
index 11504df..08de103 100644
--- a/docs/games/quoridor.md
+++ b/docs/games/quoridor.md
@@ -19,7 +19,6 @@
| `timeControl.perMoveSec` | 한 수당 제한 | 15 / 30 / 60 | 30 |
| `timeControl.baseSec` / `incSec` | 전체 / 수당 추가 | 3+2, 5+3 | 5+3 |
| `timeoutPolicy` | `perMove` 시간 초과 처리 | `autoMove`(최단 경로로 말 1칸 이동) / `lose` | `autoMove` |
-| `idleLimitSec` | `none` 무응답 한도 | 120 / 300 | 300 |
| `undo` | 무르기 허용 횟수(다른 모든 플레이어 동의) | `off` / `1` / `3` / `unlimited` | `3` |
| `drawOffer` | 무승부 제안(남은 모든 플레이어 동의) | `true` / `false` | `true` |
| `showPath` | 내 최단 경로 표시(힌트) | `true` / `false` | `true` |
@@ -155,7 +154,7 @@ interface QuoridorState {
2. `autoMove`에서 최단 경로의 첫 칸 후보가 여럿일 때 선택.
### 8.5 타이머·시간 초과·연결 끊김 시 자동 행동
-- `deadline(state)`: `perMove` → `turnStartedAt + perMoveSec*1000`, `fischer` → `turnStartedAt + remainingMs[seat]`, `none` → `turnStartedAt + idleLimitSec*1000`, 종료 → `null`.
+- `deadline(state)`: `perMove` → `turnStartedAt + perMoveSec*1000`, `fischer` → `turnStartedAt + remainingMs[seat]`, `none` → `null`(마감 없음, 무응답 시간패 없음), 종료 → `null`.
- `onTimeout(state, player)` → `{ type: 'timeout' }`. `apply`:
- `perMove + autoMove`: 이동 가능 칸 중 "목표까지 BFS 거리(말 무시)가 가장 짧아지는 칸"으로 이동(점프 포함). 동률은 RNG. 이동 불가면 자동 패스. streak 3회면 시간패.
- 그 외: 시간패. 2인은 상대 승. 4인은 기권과 같은 처리(말 제거, `timedOut`).
diff --git a/e2e/admin.e2e.ts b/e2e/admin.e2e.ts
index ce0984f..7429b28 100644
--- a/e2e/admin.e2e.ts
+++ b/e2e/admin.e2e.ts
@@ -126,9 +126,11 @@ try {
// Trying to switch to 한국식 is overridden by the server.
await g.getByRole('button', { name: '설정 바꾸기' }).click();
if (await g.getByText(/위험한 자리 알려|위협 가이드/).count()) throw new Error('host sees a threat-guide switch');
+ // Changes apply at once; the server keeps the locked rule and the sheet follows it.
await g.getByRole('button', { name: '한국식(쌍삼 금지)' }).click();
- await g.getByRole('button', { name: '저장' }).click();
await g.waitForTimeout(300);
+ if ((await g.getByRole('button', { name: '렌주룰' }).getAttribute('aria-pressed')) !== 'true') throw new Error('locked rule not restored in the sheet');
+ await g.getByRole('button', { name: '닫기' }).click();
await g.getByText('렌주룰 · 15줄 · 한 수 45초').waitFor();
await g.goto(ORIGIN + '/admin');
await g.getByText('권한이 없어요').waitFor();
diff --git a/e2e/bots.e2e.ts b/e2e/bots.e2e.ts
index cf26c25..da92714 100644
--- a/e2e/bots.e2e.ts
+++ b/e2e/bots.e2e.ts
@@ -79,8 +79,7 @@ try {
await step('오목: 상세 → 컴퓨터와 연습하기 → 대기실', async () => {
await startPractice(a, 'omok', '호랑이');
await a.getByText('🤖 컴퓨터').first().waitFor();
- // The host is seated first, the computer next; no public toggle in a practice room.
- await a.getByText('컴퓨터가 있는 방은 친구만 들어와요.').waitFor();
+ await a.getByText('🤖 연습 게임이에요. 기록에는 남지 않아요.').waitFor();
await a.screenshot({ path: join(SHOTS, 'bots-1-lobby-pc.png') });
});
diff --git a/e2e/games.e2e.ts b/e2e/games.e2e.ts
index 82dfcde..abb27e9 100644
--- a/e2e/games.e2e.ts
+++ b/e2e/games.e2e.ts
@@ -839,7 +839,6 @@ const PLANS: Record
= {
// PC host + phone guest, first meld "없음" so hint plays happen early; 10 real turns through the UI.
lobby: async (host) => {
await host.getByRole('group', { name: '첫 등록 최소 점수' }).getByRole('button', { name: '없음' }).click();
- await host.getByRole('button', { name: '설정 저장' }).click();
await host.getByText('첫 등록 점수 없음').first().waitFor();
},
drive: async (pages) => {
@@ -851,7 +850,6 @@ const PLANS: Record = {
// 말 2개로 줄여서 PC 방장 + 휴대폰 친구가 실제 화면 조작으로 끝까지 둔다(중간 화면도 저장).
lobby: async (host) => {
await host.getByRole('button', { name: '2개', exact: true }).click();
- await host.getByRole('button', { name: '설정 저장' }).click();
await host.getByText(/말 2개/).first().waitFor();
},
drive: async (pages) => {
@@ -1062,7 +1060,6 @@ const PLANS: Record = {
lobby: async (host) => {
await host.getByRole('button', { name: '체스960 (첫 줄 무작위)' }).click();
await host.getByRole('button', { name: '방장이 백', exact: true }).click();
- await host.getByRole('button', { name: '설정 저장' }).click();
await host.getByText(/체스960 · /).first().waitFor();
},
drive: async (pages) => {
@@ -1211,7 +1208,6 @@ const PLANS: Record = {
// 흔들기/폭탄 sheets, one 고 and then 스톱 — until the hand ends (스톱 or 나가리) and the game result shows.
lobby: async (host) => {
await host.getByRole('group', { name: '판 수' }).getByRole('button', { name: '1판', exact: true }).click();
- await host.getByRole('button', { name: '설정 저장' }).click();
await host.getByText(/^1판 · /).first().waitFor();
},
drive: async (pages) => {
@@ -1263,7 +1259,6 @@ const PLANS: Record = {
players: 4,
lobby: async (host) => {
await host.getByRole('group', { name: '반응 제한 시간' }).getByRole('button', { name: '25초' }).click();
- await host.getByRole('button', { name: '설정 저장' }).click();
await host.getByText(/반응 25초/).first().waitFor();
},
drive: async (pages) => {
@@ -1370,7 +1365,6 @@ const PLANS: Record = {
players: 3,
lobby: async (host) => {
await host.getByRole('group', { name: '뒤집기 제한 시간' }).getByRole('button', { name: '5초', exact: true }).click();
- await host.getByRole('button', { name: '설정 저장' }).click();
await host.getByText(/뒤집기 5초/).first().waitFor();
},
drive: async (pages) => {
@@ -1455,7 +1449,6 @@ const PLANS: Record = {
lobby: async (host) => {
await host.getByRole('group', { name: '라운드 제한' }).getByRole('button', { name: '15라운드' }).click();
await host.getByRole('group', { name: '시작 포인트' }).getByRole('button', { name: '200P' }).click();
- await host.getByRole('button', { name: '설정 저장' }).click();
await host.getByText(/^15라운드 · 시작 200P/).first().waitFor();
},
drive: async (pages) => {
@@ -1510,7 +1503,6 @@ const PLANS: Record = {
await host.getByRole('button', { name: '▼ 자세한 설정' }).click();
await host.getByRole('group', { name: '9~12 카드 빼기' }).getByRole('button', { name: '켜기' }).click();
await host.getByRole('group', { name: '한 턴 제한 시간' }).getByRole('button', { name: '45초' }).click();
- await host.getByRole('button', { name: '설정 저장' }).click();
await host.getByText(/9~12 빼기/).first().waitFor();
},
drive: async (pages) => {
@@ -1572,7 +1564,6 @@ const PLANS: Record = {
// return tokens over 10 and choose nobles when it happens. Mid-game shots in light and dark.
lobby: async (host) => {
await host.getByRole('group', { name: '끝나는 점수' }).getByRole('button', { name: '10점(짧은 판)' }).click();
- await host.getByRole('button', { name: '설정 저장' }).click();
await host.getByText(/^10점 · 한 차례 60초/).first().waitFor();
},
drive: async (pages) => {
@@ -1691,7 +1682,6 @@ const PLANS: Record = {
// through the UI until round settlements (with a duplicate-tie cancellation) and the final result appear.
lobby: async (host) => {
await host.getByRole('group', { name: '라운드 수' }).getByRole('button', { name: '3라운드' }).click();
- await host.getByRole('button', { name: '설정 저장' }).click();
await host.getByText(/^3라운드 · 흰 주사위 자동/).first().waitFor();
},
drive: async (pages) => {
@@ -1744,7 +1734,6 @@ const PLANS: Record = {
players: 3,
lobby: async (host) => {
await host.getByRole('group', { name: '같은 벌레 몇 장이면 패배' }).getByRole('button', { name: '3장(짧게)' }).click();
- await host.getByRole('button', { name: '설정 저장' }).click();
await host.getByText(/같은 벌레 3장이면 패배/).first().waitFor();
},
drive: async (pages) => {
@@ -1803,7 +1792,6 @@ const PLANS: Record = {
await host.getByRole('group', { name: '한 턴 제한 시간' }).getByRole('button', { name: '30초' }).click();
await host.getByRole('button', { name: '▼ 자세한 설정' }).click();
await host.getByRole('group', { name: '특수 카드 장수' }).getByRole('button', { name: '6장' }).click();
- await host.getByRole('button', { name: '설정 저장' }).click();
await host.getByText(/^전용 카드 · 손패 5장 · 목숨 없음 · 30초/).first().waitFor();
},
drive: async (pages) => {
@@ -1855,7 +1843,6 @@ const PLANS: Record = {
lobby: async (host) => {
await host.getByRole('button', { name: '▼ 자세한 설정' }).click();
await host.getByRole('group', { name: '카드 장수' }).getByRole('button', { name: '55장' }).click();
- await host.getByRole('button', { name: '설정 저장' }).click();
await host.getByText(/^탑 쌓기 · 55장 · 틀리면 1초 잠금/).first().waitFor();
},
drive: async (pages) => {
@@ -1916,7 +1903,6 @@ const PLANS: Record = {
lobby: async (host) => {
await host.getByRole('group', { name: '라운드 수' }).getByRole('button', { name: '1라운드' }).click();
await host.getByRole('group', { name: '그리기 시간' }).getByRole('button', { name: '60초' }).click();
- await host.getByRole('button', { name: '설정 저장' }).click();
await host.getByText(/^여러 명 맞히기 · 1라운드 · 60초/).first().waitFor();
},
drive: async (pages) => {
@@ -1951,7 +1937,6 @@ const PLANS: Record = {
await host.getByRole('group', { name: '지목 투표 시간' }).getByRole('button', { name: '10초', exact: true }).click();
await host.getByRole('group', { name: '최후의 반론 시간' }).getByRole('button', { name: '10초', exact: true }).click();
await host.getByRole('group', { name: '찬반 투표 시간' }).getByRole('button', { name: '5초', exact: true }).click();
- await host.getByRole('button', { name: '설정 저장' }).click();
await host.getByText(/밤 45초 · 투표 10초/).first().waitFor();
},
drive: async (pages) => {
diff --git a/e2e/omok.e2e.ts b/e2e/omok.e2e.ts
index bc50fbd..be2dba9 100644
--- a/e2e/omok.e2e.ts
+++ b/e2e/omok.e2e.ts
@@ -88,17 +88,20 @@ try {
await b.screenshot({ path: join(SHOTS, '5-lobby-phone.png') });
});
- await step('A: 설정(방장 흑, 자유룰) → 시작', async () => {
- // PC: the host edits settings inline in the lobby.
+ await step('A: 설정(방장 흑, 자유룰, 시간 제한 없음) → 바로 시작', async () => {
+ // PC: the host edits settings inline in the lobby. Every change applies at once (no save button).
await a.getByRole('button', { name: '자유룰' }).click();
await a.getByRole('button', { name: '방장이 흑' }).click();
- await a.getByRole('button', { name: '설정 저장' }).click();
- await a.getByText('자유룰 · 15줄').waitFor();
+ await a.getByRole('button', { name: '시간 제한 없음' }).click();
+ await a.getByText('자유룰 · 15줄 · 시간 제한 없음').waitFor();
+ await b.getByText('자유룰 · 15줄 · 시간 제한 없음').waitFor();
await a.screenshot({ path: join(SHOTS, '1-lobby-pc.png') });
await a.getByRole('button', { name: '▶ 게임 시작' }).click();
await a.getByRole('button', { name: '시작하기' }).click();
await a.getByText('내 차례예요').waitFor();
await b.getByText('호랑이님이 생각 중이에요').waitFor();
+ // 시간 제한 없음: no countdown anywhere.
+ for (const p of [a, b]) if ((await p.getByRole('timer').count()) !== 0) throw new Error('시간 제한 없음인데 타이머가 보여요');
});
await step('대국: 흑 가로 5목', async () => {
diff --git a/e2e/replay.e2e.ts b/e2e/replay.e2e.ts
index 468d040..01837bd 100644
--- a/e2e/replay.e2e.ts
+++ b/e2e/replay.e2e.ts
@@ -96,7 +96,6 @@ try {
await a.getByLabel('자리').getByText('고양이').waitFor();
await a.getByRole('button', { name: '자유룰' }).click();
await a.getByRole('button', { name: '방장이 흑' }).click();
- await a.getByRole('button', { name: '설정 저장' }).click();
await a.getByText('자유룰 · 15줄').waitFor();
await a.getByRole('button', { name: '▶ 게임 시작' }).click();
await a.getByRole('button', { name: '시작하기' }).click();
diff --git a/packages/games/src/baduk/baduk.test.ts b/packages/games/src/baduk/baduk.test.ts
index 68bd547..1a6adff 100644
--- a/packages/games/src/baduk/baduk.test.ts
+++ b/packages/games/src/baduk/baduk.test.ts
@@ -417,9 +417,12 @@ describe('clocks (§8.2, §8.5)', () => {
expect(s.result).toMatchObject({ winner: 'black', reason: 'timeLoss' });
});
- test('none: idle limit deadline', () => {
- const s = make({ timeControl: { ...byo, kind: 'none' }, idleLimitSec: 300 });
- expect(baduk.deadline!(s)).toBe(300_000);
+ test('none: no deadline, and a late move is not a time loss', () => {
+ const s = make({ timeControl: { ...byo, kind: 'none' } });
+ expect(baduk.deadline!(s)).toBeNull();
+ const late = play(s, 'D4', 3_600_000);
+ expect(late.phase).toBe('playing');
+ expect(baduk.deadline!(late)).toBeNull();
});
test('auto main time per board size', () => {
diff --git a/packages/games/src/baduk/index.ts b/packages/games/src/baduk/index.ts
index bbeb41a..04a6fd7 100644
--- a/packages/games/src/baduk/index.ts
+++ b/packages/games/src/baduk/index.ts
@@ -69,10 +69,6 @@ export const badukOptionsSchema = z
})
.default({ kind: 'byoyomi', mainSecAuto: true, mainSec: 1200, periodSec: 30, periods: 3, incSec: 10 })
.meta({ title: '시간 제한' }),
- idleLimitSec: z
- .union([z.literal(300), z.literal(600)])
- .default(600)
- .meta({ title: '시간 제한 없음일 때 무응답 한도', labels: { 300: '5분', 600: '10분' } }),
undo: z
.enum(['off', '1', '3', 'unlimited'])
.default('3')
@@ -190,7 +186,6 @@ export interface BadukView {
periodSec: number;
periods: number;
incSec: number;
- idleLimitSec: number;
mainMs: Record;
periodsLeft: Record;
inByoyomi: Record;
@@ -381,7 +376,7 @@ function chargeClock(s: BadukState, me: Color, now: number): boolean {
s.clock.mainMs[me] = left + tc.incSec * 1000;
return true;
}
- return elapsed <= s.options.idleLimitSec * 1000;
+ return true; // 시간 제한 없음
}
function marginKo(m: number, method: 'territory' | 'area'): string {
@@ -772,7 +767,6 @@ export const baduk: GameDefinition {
expect(chess.validate(s, 'B', a).ok).toBe(false);
expect(act(s, 'A', a).result).toMatchObject({ winner: 'black', reason: 'timeLoss' });
});
- test('no time control: idle limit deadline', () => {
- const s = make({ timeControl: { kind: 'none', baseMin: 10, incSec: 0 }, idleLimitSec: 300 });
- expect(chess.deadline!(s)).toBe(300_000);
+ test('no time control: no deadline, and a late first move is not aborted', () => {
+ const s = make({ timeControl: { kind: 'none', baseMin: 10, incSec: 0 } });
+ expect(chess.deadline!(s)).toBeNull();
+ const late = play1(s, 'e2e4', 3_600_000);
+ expect(late.phase).toBe('playing');
+ expect(chess.deadline!(late)).toBeNull();
});
});
diff --git a/packages/games/src/chess/index.ts b/packages/games/src/chess/index.ts
index 7e64570..8c64083 100644
--- a/packages/games/src/chess/index.ts
+++ b/packages/games/src/chess/index.ts
@@ -68,10 +68,6 @@ export const chessOptionsSchema = z.object({
.union([z.literal(15), z.literal(30), z.literal(60)])
.default(30)
.meta({ title: '첫 수 제한(넘기면 대국 취소)', labels: { 15: '15초', 30: '30초', 60: '60초' } }),
- idleLimitSec: z
- .union([z.literal(300), z.literal(600)])
- .default(600)
- .meta({ title: '시간 제한 없음일 때 무응답 한도', labels: { 300: '5분', 600: '10분' } }),
hints: z
.enum(['off', 'moves'])
.default('moves')
@@ -166,7 +162,6 @@ export interface ChessView {
checkSquare: string | null;
timeControl: ChessOptions['timeControl'];
firstMoveSec: number;
- idleLimitSec: number;
remainingMs: Record;
turnStartedAt: number;
started: Record;
@@ -439,7 +434,7 @@ export const chess: GameDefinition s.options.firstMoveSec * 1000) {
+ if (s.options.timeControl.kind === 'fischer' && elapsed > s.options.firstMoveSec * 1000) {
finish(s, null, 'aborted', events, me);
break;
}
@@ -571,7 +566,6 @@ export const chess: GameDefinition;
+ rules: Pick;
clock: JanggiState['clock'];
undo: { allowed: boolean; remaining: Record; pending: { by: Side; plies: number } | null };
draw: { allowed: boolean; pendingBy: Side | null };
@@ -697,7 +696,6 @@ export const janggi: GameDefinition {
expect(s.board[idx(1, 3)]?.kind).toBe('jol'); // the late move was not played
});
- test('timeout action → time loss for the side to move; none uses idle limit', () => {
+ test('timeout action → time loss for the side to move; none has no deadline', () => {
const s = standard();
expect(janggi.timeoutPlayers!(s)).toEqual(['A']);
const t = act(s, 'A', janggi.onTimeout(s, 'A'));
expect(janggi.result(t)).toMatchObject({ ranking: [['B'], ['A']], reason: 'timeout' });
- const n = standard({ timeControl: { kind: 'none', mainSec: 600, periodSec: 30, periods: 3 }, idleLimitSec: 300 });
- expect(janggi.deadline!(n)).toBe(n.clock.turnStartedAt + 300_000);
+ const n = standard({ timeControl: { kind: 'none', mainSec: 600, periodSec: 30, periods: 3 } });
+ expect(janggi.deadline!(n)).toBeNull();
});
});
diff --git a/packages/games/src/omok/index.ts b/packages/games/src/omok/index.ts
index 8a234a9..9cc6b90 100644
--- a/packages/games/src/omok/index.ts
+++ b/packages/games/src/omok/index.ts
@@ -56,7 +56,6 @@ export const omokOptionsSchema = z.object({
.default('autoMove')
.meta({ title: '한 수 시간이 다 되면', labels: { autoMove: '자동으로 두기', lose: '시간패' } }),
autoMoveLimit: z.number().int().min(0).max(20).default(2).meta({ title: '자동 착수 허용 횟수(넘으면 시간패)' }),
- idleLimitSec: z.number().int().min(60).max(3600).default(300).meta({ title: '시간 제한 없음일 때 무응답 한도(초)' }),
undo: z
.enum(['off', '1', '3', 'unlimited'])
.default('3')
@@ -504,7 +503,7 @@ export const omok: GameDefinition
const start = s.clock.turnStartedAt;
if (tc.kind === 'perMove') return start + tc.perMoveSec * 1000;
if (tc.kind === 'fischer') return start + s.clock.remainingMs[s.turn];
- return start + s.options.idleLimitSec * 1000;
+ return null; // 시간 제한 없음: 차례 마감 없음
},
timeoutPlayers(s) {
diff --git a/packages/games/src/omok/omok.test.ts b/packages/games/src/omok/omok.test.ts
index 3276a34..9b42098 100644
--- a/packages/games/src/omok/omok.test.ts
+++ b/packages/games/src/omok/omok.test.ts
@@ -256,6 +256,14 @@ describe('time', () => {
s = play(s, 'A1', 80_000); // white used 70s > 60s
expect(s.result).toMatchObject({ winner: 'black', reason: 'timeLoss' });
});
+
+ test('no time control: no deadline at all, even after a long think', () => {
+ const s = make({ timeControl: { kind: 'none', perMoveSec: 30, baseSec: 300, incSec: 3 } });
+ expect(omok.deadline!(s)).toBeNull();
+ const late = play(s, 'H8', 3_600_000);
+ expect(late.phase).toBe('playing');
+ expect(omok.deadline!(late)).toBeNull();
+ });
});
describe('views and playouts', () => {
diff --git a/packages/games/src/othello/index.ts b/packages/games/src/othello/index.ts
index f6c010e..f739d64 100644
--- a/packages/games/src/othello/index.ts
+++ b/packages/games/src/othello/index.ts
@@ -32,7 +32,6 @@ export const othelloOptionsSchema = z.object({
.default('autoMove')
.meta({ title: '한 수 시간이 다 되면', labels: { autoMove: '자동으로 두기', lose: '시간패' } }),
autoMoveLimit: z.number().int().min(0).max(20).default(2).meta({ title: '연속 자동 착수 허용 횟수(넘으면 시간패)' }),
- idleLimitSec: z.number().int().min(60).max(3600).default(300).meta({ title: '시간 제한 없음일 때 무응답 한도(초)' }),
undo: z
.enum(['off', '1', '3', 'unlimited'])
.default('3')
@@ -462,7 +461,7 @@ export const othello: GameDefinition {
expect(s.clock.autoMoveStreak.black).toBe(0);
});
- test('lose policy and idle limit lose on the first timeout', () => {
+ test('lose policy loses on the first timeout; no time control has no deadline', () => {
expect(act(make({ timeoutPolicy: 'lose' }), 'A', { type: 'timeout' }).result).toMatchObject({ winner: 'white', reason: 'timeLoss' });
- const idle = make({ timeControl: { kind: 'none', perMoveSec: 30, baseSec: 300, incSec: 3 }, idleLimitSec: 120 });
- expect(othello.deadline!(idle)).toBe(120_000);
- expect(act(idle, 'A', { type: 'timeout' }).result?.summary).toBe('흑 시간패로 백 승 (흑 2 : 백 2)');
+ const none = make({ timeControl: { kind: 'none', perMoveSec: 30, baseSec: 300, incSec: 3 } });
+ expect(othello.deadline!(none)).toBeNull();
expect(othello.validate(make(), 'B', { type: 'timeout' }).ok).toBe(false);
});
diff --git a/packages/games/src/quoridor/index.ts b/packages/games/src/quoridor/index.ts
index 192d1c4..953df7b 100644
--- a/packages/games/src/quoridor/index.ts
+++ b/packages/games/src/quoridor/index.ts
@@ -61,7 +61,6 @@ export const quoridorOptionsSchema = z.object({
.default('autoMove')
.meta({ title: '한 수 시간이 다 되면', labels: { autoMove: '최단 길로 말 한 칸 자동 이동', lose: '시간패' } }),
autoMoveLimit: z.number().int().min(0).max(20).default(2).meta({ title: '연속 자동 이동 허용 횟수(넘으면 시간패)' }),
- idleLimitSec: z.number().int().min(60).max(3600).default(300).meta({ title: '시간 제한 없음일 때 무응답 한도(초)' }),
undo: z
.enum(['off', '1', '3', 'unlimited'])
.default('3')
@@ -778,7 +777,7 @@ export const quoridor: GameDefinition {
test('deadline: perMove / none / fischer', () => {
expect(quoridor.deadline!(go(make(), 'e2', 7000))).toBe(37_000);
- expect(quoridor.deadline!(make(2, { timeControl: { kind: 'none', perMoveSec: 30, baseSec: 300, incSec: 3 } }))).toBe(300_000);
+ expect(quoridor.deadline!(make(2, { timeControl: { kind: 'none', perMoveSec: 30, baseSec: 300, incSec: 3 } }))).toBeNull();
const tc = { kind: 'fischer' as const, perMoveSec: 30, baseSec: 60, incSec: 5 };
let s = make(2, { timeControl: tc });
expect(quoridor.deadline!(s)).toBe(60_000);