| Summary: | Redo command cannot performed after an undo command | ||
|---|---|---|---|
| Product: | River-Crossing-Puzzle-Solver | Reporter: | tsunychau2-c |
| Component: | UI | Assignee: | tsunychau2-c |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | High | ||
| Version: | v0.1.0 | ||
| Hardware: | PC | ||
| OS: | Mac OS | ||
|
Description
tsunychau2-c
2022-11-05 22:33:10 HKT
Bug is confirmed In RedoHandlerCommand.java, on line 23, gameState.undoRedoPointer should be < gameState.history.size().
Modification of code:
public boolean canRedo() {
if(gameState.undoRedoPointer < gameState.history.size() && gameState.round.getTravelers().size() == 0 && gameState.history.size() > 1)
return true;
else
return false;
}
|