Beispiel #1
0
 public bool Push(RobotCursor cursor)
 {
     if (buffer.Count >= limit)
     {
         throw new Exception("TOO MANY PUSHES WITHOUT POPS?");
     }
     buffer.Add(cursor.GetSettings());
     return(true);
 }
Beispiel #2
0
 public bool Push(RobotCursor cursor)
 {
     if (buffer.Count >= limit)
     {
         cursor.logger.Error("Too many Pushes without Pops?");
         throw new Exception("TOO MANY PUSHES WITHOUT POPS?");
     }
     buffer.Add(cursor.GetSettings());
     return(true);
 }
Beispiel #3
0
 public Settings Pop(RobotCursor cursor)
 {
     if (buffer.Count > 0)
     {
         _settingsBeforeLastPopped = cursor.GetSettings();
         _lastPoppped = buffer.Last();
         buffer.RemoveAt(buffer.Count - 1);
         return(_lastPoppped);
     }
     return(null);
 }