위협 가이드 제거: 오목 위험 자리, 체스·장기 위험 기물 경고, 바둑 단수 경고
- 오목: 상대 3·4를 막으라는 빨간 동그라미·노란 점선(hints 옵션, view.hints, threatHints) 삭제 - 체스·장기: hints 'movesAndThreats'(주황 점선 위험 기물) 삭제 → 'off' / 'moves'만 남김 - 바둑: atariWarning 옵션과 atariWarnings(깜빡이는 단수 돌) 삭제 - 도움말 문구·설정 화면·docs 정리, 테스트는 "어떤 view에도 위협 표시 없음"으로 바꿈 - 갈 수 있는 칸 점, 금수 ×, 둘 수 없는 점 같은 규칙 표시는 그대로 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -511,16 +511,17 @@ describe('requests, undo, views', () => {
|
||||
expect(s.result).toMatchObject({ winner: 'cho', reason: 'resign' });
|
||||
});
|
||||
|
||||
test('view: no rng, legal moves only for the player to move, threats when enabled', () => {
|
||||
const s = standard({ hints: 'movesAndThreats' });
|
||||
test('view: no rng, legal moves only for the player to move, no threat warnings', () => {
|
||||
const s = standard();
|
||||
expect(JSON.stringify(janggi.view(s, 'A'))).not.toContain('rng');
|
||||
expect(janggi.view(s, null).legalMoves).toBeNull();
|
||||
expect(janggi.view(s, 'B').legalMoves).toBeNull();
|
||||
const v = janggi.view(s, 'A');
|
||||
expect(v.legalMoves!.length).toBeGreaterThan(20);
|
||||
expect(v.canPass).toBe(true);
|
||||
const t = custom([...kingsOnly, ['cho', 'ma', 4, 4], ['han', 'cha', 4, 7]], { hints: 'movesAndThreats' });
|
||||
expect(janggi.view(t, 'A').threatened).toEqual([{ f: 4, r: 4 }]);
|
||||
const t = custom([...kingsOnly, ['cho', 'ma', 4, 4], ['han', 'cha', 4, 7]]);
|
||||
expect(janggi.view(t, 'A')).not.toHaveProperty('threatened');
|
||||
expect(janggi.optionsSchema.safeParse({ hints: 'movesAndThreats' }).success).toBe(false);
|
||||
});
|
||||
|
||||
test('포 legal moves carry their screen for the UI', () => {
|
||||
|
||||
Reference in New Issue
Block a user