섯다 화면 다시 만듦(한게임 섯다처럼): 초록 테이블·가운데 판돈·숫자 키 베팅 버튼·족보 도우미, 동전 날아가기·카드 나눠 주기·뒤집기·큰 글자 연출과 소리, 실제 화투 그림(Wikimedia Commons, CC BY-SA 4.0, 고스톱도 같이), 원·판돈 표기(돈 표현 검사에서 섯다만 예외), 문서·E2E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,12 +1,17 @@
|
||||
/**
|
||||
* Guard (docs/04 §6, reviewer request): betting-game UI text must never look like real money.
|
||||
* Scans the betting games' screens and shared chip/card components for currency-like wording.
|
||||
*
|
||||
* Exception (2026-10-13, user request "한게임 섯다처럼 원과 판돈으로"): 섯다 shows its room-only play money in "원" and
|
||||
* calls the pot "판돈", like 한게임 섯다. Only those two are allowed there; currency symbols, 현금·머니·골드, "돈을/돈이/돈은"
|
||||
* and transaction words (충전·환전·결제 …) stay forbidden in 섯다 too.
|
||||
*/
|
||||
import { expect, test } from 'bun:test';
|
||||
import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
|
||||
const ROOTS = ['games/poker', 'games/seotda', 'games/gostop', 'games/marble', 'games/las-vegas', 'components/cards'].map((p) => join(import.meta.dir, p));
|
||||
const SEOTDA = join(import.meta.dir, 'games/seotda');
|
||||
const FORBIDDEN: [RegExp, string][] = [
|
||||
[/₩|\$\s?\d|\d\s?\$/, '통화 기호'],
|
||||
[/\d[\d,]*\s*(만\s*)?원(?![가-힣])/, '"원" 단위'],
|
||||
@@ -30,10 +35,25 @@ function visibleText(src: string): string {
|
||||
test('no currency-like wording in betting game UI', () => {
|
||||
const problems: string[] = [];
|
||||
for (const f of ROOTS.flatMap(files)) {
|
||||
const seotda = f.startsWith(SEOTDA);
|
||||
const text = visibleText(readFileSync(f, 'utf8'));
|
||||
text.split('\n').forEach((line, i) => {
|
||||
for (const [re, why] of FORBIDDEN) if (re.test(line)) problems.push(`${f.split('/src/')[1]}:${i + 1} ${why}: ${line.trim().slice(0, 80)}`);
|
||||
// 섯다: "판돈" is the game's word for the pot; the other 돈 words are still checked.
|
||||
const checked = seotda ? line.replace(/판돈/g, '') : line;
|
||||
for (const [re, why] of FORBIDDEN) {
|
||||
if (seotda && why === '"원" 단위') continue;
|
||||
if (re.test(checked)) problems.push(`${f.split('/src/')[1]}:${i + 1} ${why}: ${line.trim().slice(0, 80)}`);
|
||||
}
|
||||
});
|
||||
}
|
||||
expect(problems).toEqual([]);
|
||||
});
|
||||
|
||||
test('섯다 exception is narrow: 원 and 판돈 only', () => {
|
||||
const lines = ['판돈 1만원', '판돈은 그대로', '10만원 충전', '₩1000', '게임머니', '돈을 걸어요', '현금'];
|
||||
const bad = lines.filter((line) => {
|
||||
const checked = line.replace(/판돈/g, '');
|
||||
return FORBIDDEN.some(([re, why]) => why !== '"원" 단위' && re.test(checked));
|
||||
});
|
||||
expect(bad).toEqual(['10만원 충전', '₩1000', '게임머니', '돈을 걸어요', '현금']);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user