mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-16 06:51:27 +00:00
- refactor the UpdateQuality method by : * removing all static item names * strongly typing the different items * moving specific business logic inside the business object
22 lines
377 B
C#
22 lines
377 B
C#
namespace GildedRoseKata
|
|
{
|
|
public class AgingItem : Item
|
|
{
|
|
|
|
public virtual void SetAgingItemQuality()
|
|
{
|
|
if (Quality < 50)
|
|
{
|
|
Quality++;
|
|
|
|
SellIn--;
|
|
|
|
if (SellIn < 0 && Quality < 50)
|
|
{
|
|
Quality++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|