라이어 게임: 관리자 화면에서 주제·제시어 추가/수정/삭제, 바보 모드 라이어는 비슷한 단어(같은 묶음)

- 제시어 1,519개를 주제별 '비슷한 단어 묶음' 391개로 정리(bank/*.ts groups). 바보 모드 라이어는 제시어와 같은 묶음의 다른 단어를 받음
- 관리자 → 라이어 제시어(/admin/liar): 주제 추가·이름 변경·삭제(내장 주제는 다시 살리기/처음 값으로), 제시어·묶음·다른 표기·컴퓨터 설명 편집, 저장 시 topicProblems 검사
- 저장: liar_topics(바뀐 주제), liar_bank_versions(판본). 새 판 옵션에 bank 판본을 붙여(prepareOptions) 다시 보기·복구가 같은 은행 사용
- 판 상태에 주제 이름·단어 목록·다른 표기를 복사해 진행 중 판은 관리자 수정의 영향을 받지 않음
- 대기실 주제 목록은 GET /api/liar/topics, 관리자 API /api/admin/liar/topics, 기록 liar.topic.*
- 테스트: 엔진(묶음·바보 모드·판본·검사), 서버(관리자 API·새 판·재시작), E2E(관리자 편집 → 대기실 새 주제)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
EJClaw
2026-10-18 04:16:17 +09:00
parent 5a878ba991
commit 1bd69200fd
46 changed files with 1639 additions and 75 deletions

View File

@@ -113,7 +113,7 @@ describe('reading', () => {
st.word = '수박';
st.liar = players[4]!;
st.order = [...players];
const hints = topicById('fruit').words.find((w) => w.word === '수박')!.hints;
const hints = topicById('fruit')!.words.find((w) => w.word === '수박')!.hints;
const rng = SeededRng.fromSeed(seedN(4));
let now = 0;
st = liar.apply(st, players[0]!, { type: 'phaseTimeout' }, { rng, now: (now = st.phase.kind === 'reveal' ? st.phase.endsAt : 0) }).state;
@@ -149,6 +149,6 @@ describe('reading', () => {
st = liar.apply(st, players[0]!, { type: 'phaseTimeout' }, { rng: SeededRng.fromSeed(seedN(6)), now: 10_000 }).state;
const names = Object.fromEntries(players.map((p, i) => [p, `컴퓨터 ${i + 1}`]));
const bot = new LiarBot({ me: players[0]!, view: liar.view(st, players[0]!), now: 10_000, random: Math.random, persona: botPersona(players[0]!, 50), level: 50, names, memory: {} });
expect(topicById('animal').generic).toContain(bot.description());
expect(topicById('animal')!.generic).toContain(bot.description());
});
});