This commit is contained in:
@@ -45,7 +45,7 @@ public class ConsoleInterface {
|
||||
System.out.println("Your sudoku will have blocks of a " + width + " x " + height + " format.");
|
||||
int numberOfSymbols = width * height;
|
||||
List<String> listSymbols = pickSymbols(numberOfSymbols);
|
||||
List<Constraint> listConstraints = getListConstraints();
|
||||
List<IConstraint> listConstraints = getListConstraints();
|
||||
System.out.println("Now that we have the size of our sudoku, " +
|
||||
"would you rather have a single grid ('one', default), " +
|
||||
"or a a multidoku composed of 5 subgrids ('multi') ?");
|
||||
@@ -171,12 +171,12 @@ public class ConsoleInterface {
|
||||
}
|
||||
}
|
||||
|
||||
private List<Constraint> getListConstraints() {
|
||||
List<Constraint> listConstraints = SudokuFactory.DEFAULT_CONSTRAINTS;
|
||||
private List<IConstraint> getListConstraints() {
|
||||
List<IConstraint> listConstraints = SudokuFactory.DEFAULT_CONSTRAINTS;
|
||||
System.out.println(
|
||||
"The sudoku have constraints of blocks, lines and columns. Would you like to add the diagonal constraints ? (y/n, default 'no')");
|
||||
if (reader.next().equalsIgnoreCase("y")) {
|
||||
listConstraints.add(Constraint.Diagonal);
|
||||
listConstraints.add(Constraint.Diagonal.getConstraint());
|
||||
}
|
||||
return listConstraints;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user