feat: expand sudoku analysis and interoperability

This commit is contained in:
2026-08-30 23:21:56 +02:00
parent 4a9869baa0
commit 8ca9300ab3
73 changed files with 12482 additions and 384 deletions
+2 -1
View File
@@ -553,7 +553,8 @@ function findXyzWing(state: LogicalState): LogicalStep | undefined {
function findKillerReduction(state: LogicalState): LogicalStep | undefined {
const size = state.compiled.puzzle.size;
for (const constraint of state.compiled.puzzle.constraints) {
if (constraint.type !== "killer-cage") continue;
if (constraint.type !== "killer-cage" || constraint.negated === true)
continue;
const empty = constraint.cells.filter((cell) => state.values[cell] === 0);
if (empty.length === 0) continue;
const assigned = constraint.cells