게임 결과 화면: 등수 옆에 그 판의 최종 점수 표시

- GameResult/GameResultView에 scoreText(게임별 표시 문구) 추가
- 점수가 있는 18개 게임이 결과에 최종 점수 문구를 넣음 (n점, n칩, 총자산 nP, 난 말 n개, 카드 n장 등)
- 점수가 없는 게임(오목·체스·쿼리도·다빈치 코드·99·뱅·마피아·바퀴벌레 포커)은 등수만
- 결과 창 각 줄 오른쪽에 최종 점수(진하게), 그 아래 이 방 전적
- 전 게임 무작위 진행 테스트, 요트 기권 E2E, docs/06·09 갱신

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
EJClaw
2026-10-11 02:07:02 +09:00
parent 27ed513011
commit 009214c9f3
29 changed files with 153 additions and 16 deletions

View File

@@ -206,6 +206,8 @@ export interface HandRecord {
export interface SeotdaFinal {
ranking: PlayerId[][];
scores: Record<PlayerId, number>;
/** Result-screen score: chips at the end (re-buys taken back when the game ends by hand count). */
scoreText?: Record<PlayerId, string>;
summary: string;
}
@@ -740,7 +742,8 @@ function finishGame(s: SeotdaState, events: GameEvent[]): void {
} else {
summary = `${s.handsPlayed}판 만에 끝났어요. 1위 ${(seatOf(s, top[0]!)?.stack ?? 0).toLocaleString('ko-KR')}칩${best}`;
}
s.final = { ranking, scores, summary };
const scoreText = Object.fromEntries(s.seats.map((x) => [x.id, `${(byScore ? scores[x.id]! : x.stack).toLocaleString('ko-KR')}칩`]));
s.final = { ranking, scores, scoreText, summary };
events.push({ type: 'gameEnd', ranking });
}
@@ -1221,7 +1224,8 @@ export const seotda: GameDefinition<SeotdaState, SeotdaAction, SeotdaView, Seotd
result(s): GameResult | null {
if (!s.final) return null;
return { ranking: s.final.ranking, scores: s.final.scores, summary: s.final.summary, reason: 'normal' };
const { ranking, scores, scoreText, summary } = s.final;
return { ranking, scores, ...(scoreText ? { scoreText } : {}), summary, reason: 'normal' };
},
legalActions(s, p) {