fix: enforce gap between blocks in solver logic
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user