This commit is contained in:
@@ -36,7 +36,7 @@ public class BacktrackingSolver implements Solver {
|
||||
for (int symbol : possibleSymbols) {
|
||||
cellToFill.setSymbolIndex(symbol);
|
||||
addStep(cellToFill, steps);
|
||||
if (this.solve(doku)) {
|
||||
if (this.solve(doku, steps)) {
|
||||
return true;
|
||||
} else {
|
||||
cellToFill.setSymbolIndex(Cell.NOSYMBOL);
|
||||
|
||||
@@ -49,7 +49,7 @@ public class HumanSolver implements Solver {
|
||||
cellToFill.setSymbolIndex(possibleSymbols.getFirst());
|
||||
addStep(cellToFill, steps);
|
||||
|
||||
return this.solve(doku);
|
||||
return this.solve(doku, steps);
|
||||
}
|
||||
|
||||
return doku.isSolved();
|
||||
|
||||
@@ -50,7 +50,7 @@ public class MixedSolver implements Solver {
|
||||
if (possibleSymbols.size() == 1) {
|
||||
cellToFill.setSymbolIndex(possibleSymbols.getFirst());
|
||||
addStep(cellToFill, steps);
|
||||
if (this.solve(doku)) {
|
||||
if (this.solve(doku, steps)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -61,7 +61,7 @@ public class MixedSolver implements Solver {
|
||||
|
||||
cellToFill.setSymbolIndex(nextSymbol);
|
||||
addStep(cellToFill, steps);
|
||||
if (this.solve(doku)) {
|
||||
if (this.solve(doku, steps)) {
|
||||
return true;
|
||||
}
|
||||
cellToFill.setSymbolIndex(Cell.NOSYMBOL);
|
||||
|
||||
@@ -52,7 +52,7 @@ public class RandomSolver implements Solver {
|
||||
|
||||
cellToFill.setSymbolIndex(nextSymbol);
|
||||
addStep(cellToFill, steps);
|
||||
if (this.solve(doku)) {
|
||||
if (this.solve(doku, steps)) {
|
||||
return true;
|
||||
}
|
||||
cellToFill.setSymbolIndex(Cell.NOSYMBOL);
|
||||
|
||||
Reference in New Issue
Block a user