@@ -25,6 +25,10 @@ public class StateManager {
|
||||
this.doku = doku;
|
||||
}
|
||||
|
||||
public void forgetState() {
|
||||
states.pop();
|
||||
}
|
||||
|
||||
public Map<Cell, Integer> pushState() {
|
||||
states.add(saveState());
|
||||
return states.getLast();
|
||||
@@ -42,7 +46,7 @@ public class StateManager {
|
||||
return currentState;
|
||||
}
|
||||
|
||||
private void restoreState(Map<Cell, Integer> state) {
|
||||
public void restoreState(Map<Cell, Integer> state) {
|
||||
for (var entry : state.entrySet()) {
|
||||
entry.getKey().setSymbolIndex(entry.getValue());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user