Package de.sfuhrm.sudoku
Class Solver
- java.lang.Object
-
- de.sfuhrm.sudoku.Solver
-
public final class Solver extends java.lang.ObjectSolves a partially filled Sudoku. Can find multiple solutions if they are there.- Author:
- Stephan Fuhrmann
-
-
Field Summary
Fields Modifier and Type Field Description static intLIMITThe default limit.
-
Constructor Summary
Constructors Constructor Description Solver(GameMatrix solveMe)Creates a solver for the given riddle.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetLimit(int set)Set the limit for maximum results.java.util.List<GameMatrix>solve()Solves the Sudoku problem.
-
-
-
Field Detail
-
LIMIT
public static final int LIMIT
The default limit.- See Also:
limit, Constant Field Values
-
-
Constructor Detail
-
Solver
public Solver(GameMatrix solveMe)
Creates a solver for the given riddle.- Parameters:
solveMe- the riddle to solve.
-
-
Method Detail
-
setLimit
public void setLimit(int set)
Set the limit for maximum results.- Parameters:
set- the new limit.
-
solve
public java.util.List<GameMatrix> solve()
Solves the Sudoku problem.- Returns:
- the found solutions. Should be only one.
-
-