update clear function in multidoku + solver soolve
Some checks failed
Linux arm64 / Build (push) Failing after 23s
Some checks failed
Linux arm64 / Build (push) Failing after 23s
This commit is contained in:
@@ -21,13 +21,18 @@ public class MutableCell extends Cell{
|
||||
this.symboleIndex = symboleIndex;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
/**
|
||||
* Remove the current symboleIndex and returns it
|
||||
* @return integer symboleIndex cleared
|
||||
*/
|
||||
public int clear() {
|
||||
int i = this.symboleIndex;
|
||||
setSymboleIndex(NOSYMBOLE);
|
||||
return i;
|
||||
}
|
||||
|
||||
public void clear(int indexSymbol) {
|
||||
public void removeHint(int indexSymbol) {
|
||||
hintsSymbolIndex.remove(indexSymbol);
|
||||
this.clear();
|
||||
}
|
||||
|
||||
public List<Integer> getHints() {
|
||||
|
||||
@@ -27,8 +27,8 @@ public class Solver {
|
||||
int indexCurrentCell = rand.nextInt(remainingCellsToCheck.size());
|
||||
MutableCell currentCell = remainingCellsToCheck.get(indexCurrentCell);
|
||||
if (currentCell.getHints().isEmpty()){
|
||||
MutableCell modify = allMutableCells.get(stack.undo());
|
||||
modify.clear(modify.getSymboleIndex());
|
||||
MutableCell modify = stack.undo();
|
||||
modify.removeHint(modify.clear());
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user