모든 게임이 남는 화면 전체를 쓰도록: 게임별 폭 상한 제거, 판·카드·말을 --play-w/--play-h에 맞춰 키움

- 카드 게임: 펠트가 남는 높이를 채우고 손패·가운데 더미·자리 크기가 화면에 따라 커짐
- 판 게임: 체스·바둑·오목 등은 높이를 다 쓰고, 장기·쿼리도·젬블로는 넓은 화면에서 조작판을 판 옆으로
- 섯다: 자리를 판 크기에 맞춘 타원 위에 고르게 두고, 많을 때 자리 크기를 줄여 8명에서도 겹치지 않게
- 바퀴벌레 포커 6명·야단법석 달리기 5명 선수 뽑기가 PC에서 넘치지 않게
- 휴대폰·태블릿(1100px 아래) 배치는 그대로
- layout-survey: 컴퓨터 넣기 버튼 기다림, 넘친 높이(px) 표시

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
EJClaw
2026-10-17 16:17:15 +09:00
parent adc3b5337a
commit ca8baf5cc8
40 changed files with 1025 additions and 403 deletions

View File

@@ -64,7 +64,7 @@ async function measure(p: Page) {
right: Math.round(m.right - r),
bottom: Math.round(m.bottom - b),
side: side ? Math.round(side.width) : 0,
scroll: main.scrollHeight > main.clientHeight + 2 || document.documentElement.scrollHeight > innerHeight + 2,
scroll: Math.max(main.scrollHeight - main.clientHeight, document.documentElement.scrollHeight - innerHeight),
};
});
}
@@ -89,9 +89,10 @@ for (const g of games) {
await p.waitForURL(/\/r\/\d{6}$/);
if (bots) {
const add = p.getByLabel('자리').getByRole('button', { name: '🤖 컴퓨터 넣기' });
await add.first().waitFor({ timeout: 5000 }).catch(() => {}); // the lobby renders the button a moment later
for (let i = 1; i < BOTS; i++) {
if (!(await add.count()) || !(await add.isEnabled().catch(() => false))) break;
await add.click();
if (!(await add.count()) || !(await add.first().isEnabled().catch(() => false))) break;
await add.first().click();
await p.getByLabel('자리').getByText(`컴퓨터 ${i + 1}`).waitFor({ timeout: 3000 });
}
} else {
@@ -119,7 +120,7 @@ for (const g of games) {
const fw = r.used[0] / r.main[0];
const fh = r.used[1] / r.main[1];
console.log(
`${g.padEnd(20)} ${w}x${h} main ${r.main.join('x')} used ${r.used.join('x')} (${Math.round(fw * 100)}% x ${Math.round(fh * 100)}%) gap L${r.left} R${r.right} B${r.bottom} side ${r.side}${r.scroll ? ' SCROLL' : ''}`,
`${g.padEnd(20)} ${w}x${h} main ${r.main.join('x')} used ${r.used.join('x')} (${Math.round(fw * 100)}% x ${Math.round(fh * 100)}%) gap L${r.left} R${r.right} B${r.bottom} side ${r.side}${r.scroll > 2 ? ` SCROLL ${r.scroll}px` : ''}`,
);
} catch (e) {
console.log(`${g.padEnd(20)} ${w}x${h} ERROR ${(e as Error).message.split('\n')[0]}`);