Example #1
0
 public void UpdateItems(List <Item> items)
 {
     foreach (var item in items.Where(item => !ItemChecker.IsLegendary(item.Name)))
     {
         UpdateQuality(item);
         UpdateSellIn(item);
     }
 }
Example #2
0
        private void DecreaseQuality(Item item)
        {
            var decrease = UpdateCalculator.Decrease(item, ItemChecker.IsConjured(item.Name));

            if (item.Quality - decrease >= 0)
            {
                item.Quality -= decrease;
            }
        }
Example #3
0
 private void UpdateBackStagePass(Item item)
 {
     if (ItemChecker.BackStagePassExpired(item))
     {
         item.Quality = 0;
     }
     else
     {
         item.Quality += UpdateCalculator.BackStagePassIncrease(item);
     }
 }
Example #4
0
 private void IncreaseQuality(Item item)
 {
     if (ItemChecker.IsBackStagePass(item.Name))
     {
         UpdateBackStagePass(item);
     }
     else
     {
         item.Quality += UpdateCalculator.Increase(item);
     }
 }
Example #5
0
 private void UpdateQuality(Item item)
 {
     if (ItemChecker.IncreasesOverTime(item.Name))
     {
         IncreaseQuality(item);
     }
     else
     {
         DecreaseQuality(item);
     }
 }