Пример #1
0
 public void AddBall(Ball ball)
 {
     if (balls.Count == capacity)
     {
         ReturnBalls(queue);
         if (reciever == null)
         {
             queue.QueueBall(ball);
             return;
         }
         reciever.AddBall(ball);
         return;
     }
     balls.Push(ball);
 }
Пример #2
0
 public void Tick(IBallStack ballStack)
 {
     ballStack.AddBall(balls.Dequeue());
 }