위협 가이드 제거: 오목 위험 자리, 체스·장기 위험 기물 경고, 바둑 단수 경고
- 오목: 상대 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:
@@ -17,7 +17,6 @@ import {
|
||||
placeArrangement,
|
||||
positionKey,
|
||||
pseudoMoves,
|
||||
attacks,
|
||||
sqOf,
|
||||
type Arrangement,
|
||||
type Board,
|
||||
@@ -71,9 +70,9 @@ export const janggiOptionsSchema = z.object({
|
||||
drawOffer: z.boolean().default(true).meta({ title: '무승부 제안 허용' }),
|
||||
drawReofferMoves: z.number().int().min(0).max(50).default(5).meta({ title: '무승부 다시 제안까지 둬야 하는 수' }),
|
||||
hints: z
|
||||
.enum(['off', 'moves', 'movesAndThreats'])
|
||||
.enum(['off', 'moves'])
|
||||
.default('moves')
|
||||
.meta({ title: '도움 표시', labels: { off: '끄기', moves: '갈 수 있는 곳', movesAndThreats: '갈 수 있는 곳 + 잡힐 위험' } }),
|
||||
.meta({ title: '도움 표시', labels: { off: '끄기', moves: '갈 수 있는 곳' } }),
|
||||
});
|
||||
export type JanggiOptions = z.infer<typeof janggiOptionsSchema>;
|
||||
|
||||
@@ -179,7 +178,6 @@ export interface JanggiView {
|
||||
/** Only for the player to move. */
|
||||
legalMoves: JanggiLegalMove[] | null;
|
||||
canPass: boolean;
|
||||
threatened: Sq[];
|
||||
rules: Pick<JanggiOptions, 'scoring' | 'bikjang' | 'repetition' | 'allowPass' | 'moveLimit' | 'hints' | 'timeControl' | 'idleLimitSec' | 'setupTimeSec'>;
|
||||
clock: JanggiState['clock'];
|
||||
undo: { allowed: boolean; remaining: Record<Side, number | null>; pending: { by: Side; plies: number } | null };
|
||||
@@ -653,14 +651,6 @@ export const janggi: GameDefinition<JanggiState, JanggiAction, JanggiView, Jangg
|
||||
const myTurn = playing && mySide === s.turn;
|
||||
const captured: Record<Side, PieceKind[]> = { cho: [], han: [] };
|
||||
for (const m of s.moves) if (m.kind === 'move' && m.captured) captured[m.side].push(m.captured);
|
||||
let threatened: Sq[] = [];
|
||||
if (myTurn && s.options.hints === 'movesAndThreats') {
|
||||
const opp = other(s.turn);
|
||||
threatened = [];
|
||||
s.board.forEach((p, i) => {
|
||||
if (p && p.side === s.turn && p.kind !== 'king' && attacks(s.board, opp, i)) threatened.push(sqOf(i));
|
||||
});
|
||||
}
|
||||
const last = [...s.moves].reverse().find((m) => m.kind === 'move');
|
||||
const limit = undoLimit(s.options);
|
||||
const o = s.options;
|
||||
@@ -686,7 +676,6 @@ export const janggi: GameDefinition<JanggiState, JanggiAction, JanggiView, Jangg
|
||||
repeatWarning: mo?.warn ?? false,
|
||||
legalMoves: myTurn && mo ? mo.moves.map(legalToView) : null,
|
||||
canPass: myTurn && !!mo?.pass,
|
||||
threatened,
|
||||
rules: {
|
||||
scoring: o.scoring,
|
||||
bikjang: o.bikjang,
|
||||
|
||||
Reference in New Issue
Block a user