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