public int FindMostSuitableCheckin(Baggage baggage) { int chosenIndex = 0; foreach (var checkIn in Enumerable.Range(0, checkins.Count)) { if (checkins.ElementAt(checkIn).DestinationGate == baggage.DestinationGate) { if (checkins.ElementAt(checkIn).Status == BaggageStatus.Free) { chosenIndex = checkIn; return(chosenIndex); } chosenIndex = checkIn; } } return(chosenIndex); }
public override void PassBaggage(Baggage Lastbaggage) { Status = BaggageStatus.Busy; baggage = Lastbaggage; ProcessBaggage(); }
public override void PassBaggage(Baggage Lastbaggage) { throw new NotImplementedException(); }
public override void PassBaggage(Baggage lastbaggage) { Status = BaggageStatus.Busy; conveyorBelt[0] = lastbaggage; }
public Conveyor(int capacity, int timerSpeed) : base() { ConveyorSpeed = timerSpeed; timerInterval = timer.Interval; conveyorBelt = new Baggage[capacity]; }