This commit is contained in:
@@ -229,8 +229,9 @@ public class Sudoku {
|
||||
} catch (Exception e) {
|
||||
return result;
|
||||
}
|
||||
for (IConstraint constraint : this.constraints) {
|
||||
if (result.isEmpty()) {
|
||||
for (int i = 0; i < this.constraints.size(); i++) {
|
||||
IConstraint constraint = this.constraints.get(i);
|
||||
if (i == 0) {
|
||||
result.addAll(constraint.getPossibleSymbols(this, cellCoordinates.getX(), cellCoordinates.getY()));
|
||||
} else {
|
||||
result.retainAll(constraint.getPossibleSymbols(this, cellCoordinates.getX(), cellCoordinates.getY()));
|
||||
|
||||
Reference in New Issue
Block a user