mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-15 14:31:28 +00:00
separate processing of different types
This commit is contained in:
parent
3d28a742b5
commit
c7eafcaeec
@ -51,22 +51,25 @@ public class GildedRose
|
|||||||
{
|
{
|
||||||
DecreaseQuality(item, 1);
|
DecreaseQuality(item, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(IsBetterWithAgeItem(item) || IsBackstagePassesItem(item))
|
if (IsBetterWithAgeItem(item))
|
||||||
{
|
{
|
||||||
IncreaseQuality(item, 1);
|
IncreaseQuality(item, 1);
|
||||||
|
}
|
||||||
|
|
||||||
if (IsBackstagePassesItem(item))
|
if(IsBackstagePassesItem(item))
|
||||||
|
{
|
||||||
|
if (item.SellIn > 10)
|
||||||
{
|
{
|
||||||
if (item.SellIn < 11)
|
IncreaseQuality(item, 1);
|
||||||
{
|
}
|
||||||
IncreaseQuality(item, 1);
|
else if (item.SellIn > 5)
|
||||||
}
|
{
|
||||||
|
IncreaseQuality(item, 2);
|
||||||
if (item.SellIn < 6)
|
}
|
||||||
{
|
else
|
||||||
IncreaseQuality(item, 1);
|
{
|
||||||
}
|
IncreaseQuality(item, 3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user