private Rules.Rules RulesFor(Item item)
 {
     if (item.Name == BackstagePasses)
         return new BackstagePassesRules();
     if (item.Name == AgedBrie)
         return new BrieRules();
     if (item.Name == Sulfuras)
         return new SulfurasRules();
     if (item.Name == Conjured)
         return new ConjuredItemRules();
     return new NormalItemRules();
 }
Beispiel #2
0
        private void UpdateBackstagePassesQuality(Item item)
        {
            IncreaseQuality(item);

            if (item.SellIn < 11)
            {
                IncreaseQuality(item);
            }

            if (item.SellIn < 6)
            {
                IncreaseQuality(item);
            }
        }
Beispiel #3
0
 private void SetQualityTo0(Item item)
 {
     item.Quality = 0;
 }
Beispiel #4
0
 private void IncreaseQuality(Item item)
 {
     if (item.Quality < 50) {
         ++item.Quality;
     }
 }
Beispiel #5
0
 private void DecreaseSellIn(Item item)
 {
     --item.SellIn;
 }
Beispiel #6
0
 private void DecreaseQuality(Item item)
 {
     if (item.Quality > 0) {
         --item.Quality;
     }
 }
Beispiel #7
0
 private void UpdateNormalProductQuality(Item item)
 {
     DecreaseQuality(item);
 }