Example #1
0
 public BallStack(int capacity, IBallStack reciever, IBallQueue queue, bool hours = false)
 {
     this.capacity = capacity;
     if (hours)
     {
         capacity += 1;
     }
     this.reciever = reciever;
     this.queue    = queue;
     this.balls    = new Stack <Ball>();
     this.hours    = hours;
     if (hours)
     {
         balls.Push(new Ball(0)
         {
             Id = 0
         });
     }
 }
Example #2
0
 public void Tick(IBallStack ballStack)
 {
     ballStack.AddBall(balls.Dequeue());
 }