public override void Redo(ref MokkanList list) { list = listAfter.Clone(); }
// Call this function AFTER operation. public void NewState(MokkanList mokkanList) { // Keep objects state after operation. listAfter = mokkanList.Clone(); }
public override void Undo(ref MokkanList list) { list = listBefore.Clone(); }
// Create this command BEFORE operation. public CommandChange(MokkanList mokkanList) { // Keep objects state before operation. listBefore = mokkanList.Clone(); }