mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-17 15:31:27 +00:00
make if statements positve
This commit is contained in:
parent
c91b545267
commit
9a1ae8ab9d
@ -30,14 +30,14 @@ class GildedRose {
|
|||||||
updateSellInValue(item);
|
updateSellInValue(item);
|
||||||
|
|
||||||
if (item.sellIn < 0) {
|
if (item.sellIn < 0) {
|
||||||
if (!item.name.equals(AGED_BRIE)) {
|
if (item.name.equals(AGED_BRIE)) {
|
||||||
if (!item.name.equals(BACKSTAGE_PASSES)) {
|
|
||||||
degradeItem(item,1);
|
|
||||||
} else {
|
|
||||||
degradeItem(item,item.quality);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
enhanceItem(item, 1);
|
enhanceItem(item, 1);
|
||||||
|
} else {
|
||||||
|
if (item.name.equals(BACKSTAGE_PASSES)) {
|
||||||
|
degradeItem(item,item.quality);
|
||||||
|
} else {
|
||||||
|
degradeItem(item,1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user