fix: enforce gap between blocks in solver logic

This commit is contained in:
2026-02-11 01:01:53 +01:00
parent 03785d4fc4
commit 93523a6b78

View File

@@ -115,7 +115,7 @@ const solveLineLogic = (lineState, hints) => {
return result; return result;
} }
const len = hints[hintCount - 1]; const len = hints[hintCount - 1];
const maxStart = pos - len; const maxStart = pos - len - 1;
for (let start = maxStart; start >= 0; start--) { for (let start = maxStart; start >= 0; start--) {
if (hasCross(start, start + len)) continue; if (hasCross(start, start + len)) continue;
if (start + len < pos && lineState[start + len] === 1) continue; if (start + len < pos && lineState[start + len] === 1) continue;