示例#1
0
 public bool RunUndoCommand(Map map, UndoCommand command)
 {
     if (command == null)
         return false;
     bool retval = command.Run(map);
     if (retval)
     {
         Moves.DecreaseMovesLeft(Moves.MovesLeft); // to make sure Moves left is zero
         Moves.IncreaseMovesLeft(command.MovesLeft);
         has_run_command = false;
     }
     return retval;
 }
示例#2
0
 public UndoCommandEventArgs(UndoCommand undo_command)
 {
     _undo_command = undo_command;
 }