fix : création MultiDoku à résoudre avec cell imuable
All checks were successful
Linux arm64 / Build (push) Successful in 53s

This commit is contained in:
Melvyn
2025-01-29 11:26:36 +01:00
parent 5ad8fa30f4
commit a221233c06
2 changed files with 9 additions and 1 deletions

View File

@@ -198,5 +198,11 @@ public class MultiDoku {
} }
return result; return result;
} }
public void setFilledCellsImmutable() {
for (Cell filledCell : getFilledCells()) {
filledCell.setImmutable();
}
}
} }

View File

@@ -217,7 +217,7 @@ public class SudokuFactory {
public static MultiDoku createBasicXShapedMultidoku(int size) { public static MultiDoku createBasicXShapedMultidoku(int size) {
assert (size > 1); assert (size > 1);
/** /*
* 2 3 * 2 3
* 1 * 1
* 4 5 * 4 5
@@ -245,6 +245,7 @@ public class SudokuFactory {
if (!successfull) { if (!successfull) {
throw new Exception("Canno't create this doku with this difficulty"); throw new Exception("Canno't create this doku with this difficulty");
} }
doku.setFilledCellsImmutable();
return doku; return doku;
} }
@@ -260,6 +261,7 @@ public class SudokuFactory {
if (!successful) { if (!successful) {
throw new Exception("Cannot create this Doku with this difficulty"); throw new Exception("Cannot create this Doku with this difficulty");
} }
doku.setFilledCellsImmutable();
return doku; return doku;
} }
} }