Example #1
0
 public void HandleDeparture(Lot lot)
 {
     Reward.UpdateUponDeparture(lot);
     CurrentWIP           -= 1;
     Lots[LotIndexes[lot]] = null;
     LotIndexes.Remove(lot);
     LotGenerator.GenerateRandomLot();
 }
Example #2
0
        public void HandleGeneration(Lot lot)
        {
            CurrentWIP += 1;

            for (int i = 0; i < TargetWIP; i++)
            {
                if (Lots[i] == null)
                {
                    Lots[i] = lot;
                    LotIndexes.Add(lot, i);
                    break;
                }
                else if (i == TargetWIP - 1)
                {
                    throw new Exception("No empty space for in Lot array to store current lot.");
                }
            }
        }
Example #3
0
 protected override void OnReplicationEnd()
 {
     CurrentWIP = 0;
     LotIndexes.Clear();
 }