feat: expand sudoku analysis and interoperability
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user