Example #1
0
 public void undo(int levels)
 {
     for (int i = 0; i < levels; i++)
     {
         if (current > 0)
         {
             CommandPattern command = comandos[--current];
             comandos.Remove(command);
             command.undo();
         }
     }
 }
Example #2
0
 public void compute(CommandPattern command)
 {
     command.execute();
     comandos.Add(command);
     current++;
 }