mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-15 22:41:30 +00:00
- Updated CustomMethod - Updated implementation of update quality and sellin in derived classes
22 lines
471 B
C#
22 lines
471 B
C#
using GildedRose.Abstraction;
|
|
using GildedRoseKata;
|
|
|
|
namespace GildedRose.Models
|
|
{
|
|
public class Conjured : Item, ICustomMethod
|
|
{
|
|
public int SellDaysGone { get; set; }
|
|
|
|
public void UpdateQuality()
|
|
{
|
|
if (this.SellDaysGone > this.SellIn && this.Quality > 1)
|
|
this.Quality -= 2;
|
|
}
|
|
|
|
public void UpdateSellIn()
|
|
{
|
|
if (this.SellIn > 0)
|
|
this.SellIn--;
|
|
}
|
|
}
|
|
} |