redo method
void
redo()
Redo the last undone move and restore the forth state.
Implementation
void redo() {
if (redoHistory.isNotEmpty) {
String currentFEN = toFEN();
if (redoHistory.last == currentFEN) {
redoHistory.removeLast();
return;
}
history.add(currentFEN);
initFEN(redoHistory.removeLast());
}
}