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); }
public void Tick(IBallStack ballStack) { ballStack.AddBall(balls.Dequeue()); }