whoa
Some checks failed
Linux arm64 / Build (push) Failing after 23s

This commit is contained in:
Janet-Doe
2025-01-10 17:04:58 +01:00
parent d849f3afc4
commit e2c8253f4a
4 changed files with 97 additions and 3 deletions

View File

@@ -1,5 +1,9 @@
package sudoku;
import sudoku.constraint.IConstraint;
import javax.swing.*;
import java.util.ArrayList;
import java.util.List;
/**
@@ -22,8 +26,27 @@ public class Sudoku {
return this.cells.get(index);
}
public Cell getCell(int i) {
return this.cells.get(i);
}
public int getSize() {
return this.blocks.size();
}
public Boolean isValid(List<IConstraint> constraints) {
//not implemented
//for eachcase check contraintes
throw new Error("Function isValid() not implemented");
}
public List<MutableCell> getMutableCells() {
List<MutableCell> mutableCells = new ArrayList<>();
for (Cell cell : this.cells) {
if (cell instanceof MutableCell){
mutableCells.add((MutableCell) cell);
}
}
return mutableCells;
}
}