섯다 화면 다시 만듦(한게임 섯다처럼): 초록 테이블·가운데 판돈·숫자 키 베팅 버튼·족보 도우미, 동전 날아가기·카드 나눠 주기·뒤집기·큰 글자 연출과 소리, 실제 화투 그림(Wikimedia Commons, CC BY-SA 4.0, 고스톱도 같이), 원·판돈 표기(돈 표현 검사에서 섯다만 예외), 문서·E2E

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
EJClaw
2026-10-13 13:35:23 +09:00
parent 8cde4fa525
commit b6b9dbc963
58 changed files with 1311 additions and 758 deletions

View File

@@ -7,8 +7,8 @@ const users = usersOf(['A', 'B', 'C']);
const view = (s: unknown, who: string | null) => GAMES.seotda!.view(s, who) as any;
const nickOf = (id: string) => users[id]!.nickname;
test('섯다: 내 차례(버튼·족보) / 상대 차례 / 관전', () => {
const { state } = setupGame('seotda', 3);
test('섯다: 내 차례(버튼·족보) / 상대 차례 / 관전 (1장씩 받는 방)', () => {
const { state } = setupGame('seotda', 3, { dealMode: 'twoRounds' });
const turn = view(state, null).toAct as string;
const other = ['A', 'B', 'C'].find((id) => id !== turn)!;
@@ -27,7 +27,7 @@ test('섯다: 내 차례(버튼·족보) / 상대 차례 / 관전', () => {
const spec = helpNow(view(state, null), null, users);
expect(spec).toContain(`${nickOf(turn)}님 차례예요`);
expect(spec).toContain('모인 칩');
expect(spec).toContain('판돈은 3만원');
expect(spec).not.toContain('내 족보');
expect(spec).not.toContain('월 한 장');
@@ -37,11 +37,25 @@ test('섯다: 내 차례(버튼·족보) / 상대 차례 / 관전', () => {
const t = helpNow(view(s2, next), next, users);
expect(t).toContain('[콜]');
expect(t).toContain('[따당]');
expect(t).toContain('[콜]은 그만큼(10 칩) 맞추는');
expect(t).toContain('[콜]은 그만큼(1만원) 맞추는');
expect(t).toContain('숫자 키(콜 7');
});
test('섯다: 한게임 기본(2장 한 번에), 베팅 규칙 111 안내', () => {
const { state } = setupGame('seotda', 3);
const turn = view(state, null).toAct as string;
const t = helpNow(view(state, turn), turn, users);
expect(t).toContain('2장을 받고 한 번만 베팅해요');
expect(t).toContain('지금 내 족보:');
const forced = setupGame('seotda', 3, { betRule: '111' }).state;
const p = view(forced, null).toAct as string;
const f = helpNow(view(forced, p), p, users);
expect(f).toContain('누를 수 있는 버튼: [다이] [하프]');
expect(f).toContain('베팅 규칙 111');
});
test('섯다: 2장째를 받으면 지금 내 족보와 마지막 베팅, 족보 숨기기 옵션', () => {
let { state } = setupGame('seotda', 2);
let { state } = setupGame('seotda', 2, { dealMode: 'twoRounds' });
for (let i = 0; i < 2; i++) state = applyAction('seotda', state, view(state, null).toAct, { type: 'check' });
const v = view(state, null);
expect(v.street).toBe(1);
@@ -51,7 +65,7 @@ test('섯다: 2장째를 받으면 지금 내 족보와 마지막 베팅, 족보
const off = setupGame('seotda', 2, { hints: false }).state;
const p = view(off, null).toAct as string;
expect(helpNow(view(off, p), p, users)).toContain("'족보표'를 보고");
expect(helpNow(view(off, p), p, users)).toContain("'족보 도우미'를 보고");
});
test('섯다: 3장 섯다 고르기 단계', () => {
@@ -61,7 +75,7 @@ test('섯다: 3장 섯다 고르기 단계', () => {
const t = helpNow(view(state, 'A'), 'A', users);
expect(t).toContain('2장을 눌러 고르면');
expect(t).toContain('정하기');
expect(t).toContain('[추천 조합]');
expect(t).toContain('(추천)]이 가장 센 조합');
expect(helpNow(view(state, null), null, users)).toContain('몰래 고르는 중');
const v = view(state, 'A');
@@ -81,7 +95,7 @@ test('섯다: 모두 다이 → 판 결과와 [다음 판으로], 다이한 사
expect(t).toContain('[다음 판으로]');
});
test('섯다: 칩 다시 받기 / 구사 재경기 참가 / 재경기 표시', () => {
test('섯다: 시작 금액 다시 받기 / 구사 재경기 참가 / 재경기 표시', () => {
const { state } = setupGame('seotda', 3);
const rebuy = structuredClone(state);
rebuy.phase = 'rebuy';
@@ -90,15 +104,16 @@ test('섯다: 칩 다시 받기 / 구사 재경기 참가 / 재경기 표시', (
rebuy.seats.find((s: any) => s.id === 'B').status = 'busted';
rebuy.seats.find((s: any) => s.id === 'B').stack = 0;
const b = helpNow(view(rebuy, 'B'), 'B', users);
expect(b).toContain('[칩 다시 받기]');
expect(b).toContain('[다시 받기]');
expect(b).toContain('100만원');
expect(b).toContain('[그만하기]');
expect(helpNow(view(rebuy, 'A'), 'A', users)).toContain('고양이님이 칩을 다시 받을지');
expect(helpNow(view(rebuy, 'A'), 'A', users)).toContain('고양이님이 시작 금액을 다시 받을지');
const rejoin = structuredClone(state);
rejoin.hand.phase = 'rejoin';
rejoin.hand.rejoinPending = ['C'];
rejoin.hand.rejoinCost = 50;
expect(helpNow(view(rejoin, 'C'), 'C', users)).toContain('[50 칩 내고 참가]');
rejoin.hand.rejoinCost = 15_000;
expect(helpNow(view(rejoin, 'C'), 'C', users)).toContain('[1만 5,000원 내고 참가]');
expect(helpNow(view(rejoin, 'A'), 'A', users)).toContain('다시 들어올지');
const re = structuredClone(state);
@@ -112,6 +127,6 @@ test('섯다: 게임 끝', () => {
const end = structuredClone(state);
end.phase = 'finished';
end.hand = null;
end.final = { ranking: [['A'], ['B']], scores: { A: 10, B: -10 }, summary: '20판 끝. 1위 +10칩' };
end.final = { ranking: [['A'], ['B']], scores: { A: 10_000, B: -10_000 }, summary: '20판 끝. 1위 +1만원' };
expect(helpNow(view(end, 'A'), 'A', users)).toContain('게임이 끝났어요. 20판 끝');
});