Esempio n. 1
0
 private static void Setup()
 {
     for (int hour = 7; hour <= 22; hour++)
     {
         planes.Add(new Plane(new Time(hour, 00, 00)));
     }
     queue    = new NotPrioritisingPassengerArrayQueue <Passenger>(10000);
     producer = new PassengerProducer(planes, queue);
     consumer = new PassengerConsumer(planes, queue);
     clock    = new Clock(producer, consumer, new Time(05, 00, 00));
 }
Esempio n. 2
0
 public PassengerProducer(List <Plane> planes, NotPrioritisingPassengerArrayQueue <Passenger> queue)
 {
     this.planes      = planes;
     this.queue       = queue;
     lastDeartureTime = planes[^ 1].GetDepartureTime();
Esempio n. 3
0
 public PassengerConsumer(List <Plane> planes, NotPrioritisingPassengerArrayQueue <Passenger> queue)
 {
     this.planes = planes;
     this.queue  = queue;
 }