feat : solver + test
All checks were successful
Linux arm64 / Build (push) Successful in 5m9s

This commit is contained in:
Melvyn
2025-01-23 23:20:16 +01:00
parent 6902321101
commit 483b286bac
13 changed files with 292 additions and 183 deletions

View File

@@ -1,14 +1,15 @@
package sudoku.constraint;
import sudoku.Block;
import sudoku.Cell;
import sudoku.Sudoku;
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.containsSymbol(newSymbolIndex);
Block block = s.getCell(x, y).getBlock();
return !block.containsSymbol(newSymbolIndex);
}
}