refractoring
All checks were successful
Linux arm64 / Build (push) Successful in 33s

This commit is contained in:
Janet-Doe
2025-01-21 13:49:22 +01:00
parent 5a07f9347c
commit e5618b70c1
8 changed files with 60 additions and 36 deletions

View File

@@ -14,10 +14,12 @@ public class Sudoku {
private final List<Block> blocks;
private final List<Cell> cells;
private final List<IConstraint> constraints;
public Sudoku(List<Cell> cells, List<Block> blocks) {
public Sudoku(List<Cell> cells, List<Block> blocks, List<IConstraint> constraints) {
this.cells = cells;
this.blocks = blocks;
this.constraints = new ArrayList<>(constraints);
}
public Cell getCell(int x, int y) {
@@ -30,6 +32,10 @@ public class Sudoku {
return this.cells.get(i);
}
public List<IConstraint> getConstraints() {
return constraints;
}
public int getSize() {
return this.blocks.size();
}