22 lines
485 B
JavaScript
22 lines
485 B
JavaScript
import perimeter from Solver.SingleCell;
|
|
import * as State from Solver.State;
|
|
|
|
return {
|
|
find: find
|
|
};
|
|
|
|
function find(solvingState) {
|
|
solvingState.missing.map(f(solvingState))
|
|
};
|
|
|
|
function f(solvingState) {
|
|
return function(cell) {
|
|
var forked = State.fork(solvingState);
|
|
State.set(forked, cell, true);
|
|
}
|
|
}
|
|
|
|
function checkContradiction(beforeState, afterState, cell) {
|
|
//TODO has one cellSet (color, row, column) become empty ? if it doesn't contain cell, it's a contradiction
|
|
}
|