This commit is contained in:
@@ -10,6 +10,7 @@ import sudoku.structure.Block;
|
||||
import sudoku.structure.Cell;
|
||||
import sudoku.structure.MultiDoku;
|
||||
import sudoku.structure.Sudoku;
|
||||
import sudoku.structure.SudokuFactory;
|
||||
|
||||
public class SudokuSerializer {
|
||||
|
||||
@@ -152,7 +153,7 @@ public class SudokuSerializer {
|
||||
sudokuBlocks.add(blocks.get(blockID));
|
||||
}
|
||||
|
||||
Sudoku s = new Sudoku(sudokuCells, sudokuBlocks, null);
|
||||
Sudoku s = new Sudoku(sudokuCells, sudokuBlocks, SudokuFactory.DEFAULT_CONSTRAINTS);
|
||||
s.setBlockWidth(sudokuJsonObject.getInt("blockWidth"));
|
||||
sudokus.add(s);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import sudoku.constraint.LineConstraint;
|
||||
|
||||
public class SudokuFactory {
|
||||
|
||||
private static List<IConstraint> DEFAULT_CONSTRAINTS = Arrays.asList(new BlockConstraint(), new LineConstraint(), new ColumnConstraint());
|
||||
public static List<IConstraint> DEFAULT_CONSTRAINTS = Arrays.asList(new BlockConstraint(), new LineConstraint(), new ColumnConstraint());
|
||||
|
||||
private static List<Cell> initCells(int size) {
|
||||
List<Cell> cells = new ArrayList<>(size * size);
|
||||
|
||||
Reference in New Issue
Block a user