M9: 게임 26종 30초 요약 카드·[?] 지금 할 수 있는 것 내용
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -35,7 +35,10 @@ describe.each(IDS)('%s', (id) => {
|
||||
const { helpNow } = await import(`./${id}/help`);
|
||||
const def = GAMES[id]!;
|
||||
const range = def.playersFor?.(def.defaultOptions) ?? { min: def.minPlayers, max: def.maxPlayers };
|
||||
const n = Math.min(range.max, Math.max(range.min, 3));
|
||||
// 3 players where allowed; otherwise the nearest count the game accepts (e.g. 벽 쌓기 길찾기: 2 or 4).
|
||||
const want = Math.min(range.max, Math.max(range.min, 3));
|
||||
const counts = Array.from({ length: range.max - range.min + 1 }, (_, i) => range.min + i).sort((a, b) => Math.abs(a - want) - Math.abs(b - want) || a - b);
|
||||
const n = counts.find((c) => !def.playerCountError?.(def.defaultOptions, c)) ?? want;
|
||||
const users = usersOf(seatIds(n));
|
||||
let count = 0;
|
||||
eachView(id, n, (view, who) => {
|
||||
|
||||
Reference in New Issue
Block a user