refactor : Solver
All checks were successful
Linux arm64 / Build (push) Successful in 37s

This commit is contained in:
Melvyn
2025-01-30 12:03:03 +01:00
parent 67da77af2e
commit bf67afe4a9
6 changed files with 54 additions and 18 deletions

View File

@@ -19,7 +19,7 @@ public class SudokuSerializerTest {
void testSerializeWithSize(int blockWidth, int blockHeight) {
var sudoku = SudokuFactory.createBasicEmptyRectangleDoku(blockWidth, blockHeight,
SudokuFactory.DEFAULT_CONSTRAINTS);
Solver.solveRandom(sudoku, new Random());
Solver.randomSolve(sudoku, new Random());
JSONObject data = SudokuSerializer.serializeSudoku(sudoku);
MultiDoku multiDoku = SudokuSerializer.deserializeSudoku(data);
assertTrue(data.toString().equals(SudokuSerializer.serializeSudoku(multiDoku).toString()));
@@ -28,7 +28,7 @@ public class SudokuSerializerTest {
void testSaveWithSize(int blockWidth, int blockHeight) {
MultiDoku doku = SudokuFactory.createBasicEmptyRectangleDoku(blockWidth, blockHeight,
SudokuFactory.DEFAULT_CONSTRAINTS);
Solver.solveRandom(doku, new Random());
Solver.randomSolve(doku, new Random());
String savePath = SudokuSerializer.saveMultiDoku(doku);
MultiDoku otherDoku = null;
try {
@@ -47,7 +47,7 @@ public class SudokuSerializerTest {
void testSerializeX(int size) {
var sudoku = SudokuFactory.createBasicXShapedMultidoku(size, SudokuFactory.DEFAULT_CONSTRAINTS);
Solver.solveRandom(sudoku, new Random());
Solver.randomSolve(sudoku, new Random());
JSONObject data = SudokuSerializer.serializeSudoku(sudoku);
MultiDoku multiDoku = SudokuSerializer.deserializeSudoku(data);