merge
Some checks failed
Linux arm64 / Build (push) Failing after 20s

This commit is contained in:
Janet-Doe
2025-01-21 19:10:06 +01:00
parent 963cea897c
commit 4bd55d4ce4
9 changed files with 151 additions and 37 deletions

View File

@@ -8,8 +8,15 @@ public class BlockConstraint implements IConstraint{
@Override
public boolean canBePlaced(final Sudoku s, int x, int y, int newSymbolIndex) {
Block bloc = s.getCell(x, y).getBlock();
return !bloc.getCells().contains(new MutableCell(newSymbolIndex));
/*
boolean result = true;
for (Block block : s.getCell(x, y).getBlockContainers()) {
result = result && (!block.getCells().contains(new MutableCell(newSymbolIndex)));
}
*/
return !s.getBlocks().getCells().contains(new MutableCell(newSymbolIndex));
}
}