refractoring
All checks were successful
Linux arm64 / Build (push) Successful in 33s

This commit is contained in:
Janet-Doe
2025-01-21 13:49:22 +01:00
parent 5a07f9347c
commit e5618b70c1
8 changed files with 60 additions and 36 deletions

View File

@@ -5,38 +5,38 @@ import java.util.List;
public class MutableCell extends Cell{
private final List<Integer> hintsSymbolIndex;
private final List<Integer> possibleSymbols;
public MutableCell() {
super();
this.hintsSymbolIndex = new ArrayList<>();
this.possibleSymbols = new ArrayList<>();
}
public MutableCell(int symboleIndex) {
super(symboleIndex);
this.hintsSymbolIndex = new ArrayList<>();
public MutableCell(int symbolIndex) {
super(symbolIndex);
this.possibleSymbols = new ArrayList<>();
}
public void setSymboleIndex(int symboleIndex) {
this.symboleIndex = symboleIndex;
public void setSymbolIndex(int symbolIndex) {
this.symbolIndex = symbolIndex;
}
/**
* Remove the current symboleIndex and returns it
* @return integer symboleIndex cleared
* Remove the current symbolIndex and returns it
* @return integer symbolIndex cleared
*/
public int clear() {
int i = this.symboleIndex;
setSymboleIndex(NOSYMBOLE);
public int clearCurrentSymbol() {
int i = this.symbolIndex;
setSymbolIndex(NOSYMBOLE);
return i;
}
public void removeHint(int indexSymbol) {
hintsSymbolIndex.remove(indexSymbol);
public void removeSymbolFromPossibilities(int indexSymbol) {
possibleSymbols.remove(indexSymbol);
}
public List<Integer> getHints() {
return this.hintsSymbolIndex;
public List<Integer> getPossibleSymbols() {
return this.possibleSymbols;
}
}