채팅 연타가 몇 초씩 밀리던 문제: 브라우저가 0.55초(마피아·라이어 0.75초)에 한 줄씩만 내보내던 대기열과 게임 채팅 0.7초 간격 제한을 없애고, 방 채팅·마피아·라이어가 같은 속도 규칙(한 번에 6줄, 그 뒤 0.3초에 한 줄)을 쓰게. 사람이 치는 속도로는 기다리지 않고 바로 올라감

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
EJClaw
2026-10-14 04:09:29 +09:00
parent cf2903dc75
commit ff3c53ab4a
17 changed files with 115 additions and 41 deletions

View File

@@ -257,11 +257,13 @@ describe('차례대로 설명 (§5.2)', () => {
let s = rig(3);
expect(reject(s, 'P0', { type: 'chat', text: '안녕' })).toContain('확인하는 중');
s = until(s, 'discussion');
s = act(s, 'P1', { type: 'chat', text: '누구지' });
expect(reject(s, 'P1', { type: 'chat', text: '또' }, at(s) - 1000 + 100)).toBe('조금 천천히 보내 주세요.');
const t = at(s);
// A quick run of lines goes through at once; only a flood is refused.
for (let i = 0; i < 6; i++) s = act(s, 'P1', { type: 'chat', text: `누구지 ${i}` }, t);
expect(reject(s, 'P1', { type: 'chat', text: '또' }, t + 100)).toBe('조금 천천히 보내 주세요.');
s = until(s, 'vote');
s = act(s, 'P2', { type: 'chat', text: '투표해요' });
expect(s.chat.map((m) => m.text)).toEqual(['누구지', '투표해요']);
expect(s.chat.map((m) => m.text)).toEqual(['누구지 0', '누구지 1', '누구지 2', '누구지 3', '누구지 4', '누구지 5', '투표해요']);
});
});