This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user