private void Move(Direction direction) { MyRemoveCommand removeCommand = new MyRemoveCommand(removeCommandReceiver, direction, moveObject, distance); removeCommand.Execute(); rCommands.Add(removeCommand); currentNum++; }
public void Redo() { if (currentNum < rCommands.Count) { MyRemoveCommand removeCommand = (MyRemoveCommand)rCommands[currentNum]; currentNum++; removeCommand.Execute(); } }