Code
We are happy to give you the code used for solving Sudoku. It's written is Java and it'is quiet simple. You may start by the class call Solver and follow the path.
You can reuse the code and consider it as in lgpl.
Solver.java Grid.java SolvingGrid.java Cell.java CellDecision.java GridUtils.java
package com.asksudoku.logic;
import java.util.List;
public class CellDecision {
private int x;
private int y;
private List values;
public CellDecision(int x, int y, boolean[] choices) {
this.x = x;
this.y = y;
values = GridUtils.choiceToList(choices);
}
public List<Integer> getValues() {
return values;
}
public int getX() {
return x;
}
public int getY() {
return y;
}
public static CellDecision compare(CellDecision a, CellDecision b){
if (a == null && b == null) throw new IllegalArgumentException("Both argument cannot be null");
if (a == null) return b;
if (b == null) return a;
if (b.values.size() == 1) return a;
if (a.values.size() == 1) return b;
if (a.values.size() <= b.values.size()) return a;
return b;
}
}



