From 75f4cc982f8a0f607102d2dbb84c2fff964a318b Mon Sep 17 00:00:00 2001 From: umsangdon Date: Sat, 17 Oct 2026 13:16:57 +0900 Subject: [PATCH] =?UTF-8?q?fix(B06=20=ED=9A=A1=EB=8B=A8):=20=EC=95=94=20?= =?UTF-8?q?=EA=B2=BD=EA=B3=84=EC=84=A0=20=ED=8C=90=EC=A0=95=20=EC=84=A0?= =?UTF-8?q?=EC=9D=84=20=EC=84=A4=EA=B3=84=EC=84=A0=20=ED=8C=90=EC=A0=95=20?= =?UTF-8?q?=EC=95=84=EB=9E=98=EB=A1=9C=20=E2=80=94=20=EC=82=AC=EB=A9=B4=20?= =?UTF-8?q?=EB=B0=9C=EC=B9=98=20=EA=B2=B9=EC=B9=9C=20=EC=9E=90=EB=A6=AC?= =?UTF-8?q?=EB=8A=94=20=EC=82=AC=EB=A9=B4=EC=9D=B4=20=EB=A8=BC=EC=A0=80=20?= =?UTF-8?q?=EA=B3=A8=EB=9D=BC=EC=A7=90=20(370-3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 화면 검증에서 1+0 우 절토 사면 누름이 암 판정 선에 먹힘 · 그리는 차례만 아래로(키 차례 그대로) - test_370_3 판정 선 「설계선 판정 아래」 확인 · helper insertBefore 참조 자리 따름 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_014utrjfoW831Vc5wJUd13kL --- B06_Section/B06_Section_UI_Cross_Design_Pick.ts | 2 ++ resources/tester/helper_370_3_rock_cell.cjs | 11 +++++++---- resources/tester/test_370_3_rock_cell.py | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/B06_Section/B06_Section_UI_Cross_Design_Pick.ts b/B06_Section/B06_Section_UI_Cross_Design_Pick.ts index a6a4c892d..1a5cf4395 100644 --- a/B06_Section/B06_Section_UI_Cross_Design_Pick.ts +++ b/B06_Section/B06_Section_UI_Cross_Design_Pick.ts @@ -522,6 +522,8 @@ export function attachDesignLinePick(input: { }); layer.insertBefore(hit, firstStructureHit ?? null); }); + // 암 판정 선은 보라 선 판정 아래 — 사면 발치처럼 겹친 자리는 설계선이 먼저 골라짐 + if (rockHit && hits[0] !== rockHit) layer.insertBefore(rockHit, hits[0]); const cell = buildLineCell(); let side: CrossSide | null = null; diff --git a/resources/tester/helper_370_3_rock_cell.cjs b/resources/tester/helper_370_3_rock_cell.cjs index bce0124f2..a89734c7d 100644 --- a/resources/tester/helper_370_3_rock_cell.cjs +++ b/resources/tester/helper_370_3_rock_cell.cjs @@ -47,8 +47,11 @@ class Node { append(...kids) { this.children.push(...kids); } - insertBefore(kid) { - this.children.push(kid); + insertBefore(kid, ref) { + this.children = this.children.filter((k) => k !== kid); + const at = ref ? this.children.indexOf(ref) : -1; + if (at < 0) this.children.push(kid); + else this.children.splice(at, 0, kid); } setAttribute(n, v) { this.attrs[n] = String(v); @@ -238,13 +241,13 @@ const out = {}; // ② 판정 선 — 점선 위 path 하나(끊긴 두 토막 · M 둘) · 보라 선 판정 클래스 · 키 rock { const c = card(); - const index = c.hits.indexOf(c.rockHit); c.rockHit.click(); + const index = c.picks[0]; out.hit = { found: !!c.rockHit, tag: c.rockHit?.tagName, moves: (c.rockHit?.getAttribute("d").match(/M/g) ?? []).length, - last: index === c.hits.length - 1, + below: c.hits.indexOf(c.rockHit) === 0, // 그리는 차례 = 보라 선 판정 아래(겹친 자리는 설계선) picked: c.picks, }; // ③ 고름 — 제목 · ▲▼↺ · ◀▶ 막음 · ▲▼ = 암만(종단으로 안 샘) diff --git a/resources/tester/test_370_3_rock_cell.py b/resources/tester/test_370_3_rock_cell.py index c1e579be8..c67fc3de4 100644 --- a/resources/tester/test_370_3_rock_cell.py +++ b/resources/tester/test_370_3_rock_cell.py @@ -42,7 +42,7 @@ def test_안_고르면_공용_칸은_암_버튼과_값(out: dict) -> None: def test_암_경계선_판정_선(out: dict) -> None: hit = out["hit"] assert hit["found"] and hit["tag"] == "path" and hit["moves"] == 2 # 끊긴 두 토막 한 판정 - assert hit["last"] and hit["picked"] == [3] # 조각 셋 뒤 · 누르면 고름 + assert hit["below"] and hit["picked"] == [3] # 설계선 판정 아래 · 키 차례 = 조각 셋 뒤 def test_암_고름은_위아래만_암_키는_암만(out: dict) -> None: