예제 #1
0
        public void ProcessIncomingShipments()
        {
            Order shipment = null;

            if (Shipments.TryPeek(out shipment))
            {
                if (shipment.ProcessOn == simulator.CurrentDay)
                {
                    // dequeue
                    Shipments.TryDequeue(out shipment);

                    // add to Inventory
                    Inventory += shipment.Amount;
                    Expected  -= shipment.Amount;
                    CurReceive = shipment.Amount;
                }
            }
        }