mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-04 09:11:39 +00:00
lift up condition with BackstagePasses
This commit is contained in:
parent
39c548b2d6
commit
74c809e44a
@ -20,19 +20,20 @@ class GildedRose {
|
||||
item.increaseQualityByOne();
|
||||
}
|
||||
} else {
|
||||
boolean isBackstagePasses = item.isBackstagePasses();
|
||||
if (isBackstagePasses) {
|
||||
if (item.isBackstagePasses()) {
|
||||
item.increaseQualityBackstage();
|
||||
|
||||
item.decreaseSellInEachDay();
|
||||
|
||||
if (item.sellIn < 0) {
|
||||
item.quality = 0;
|
||||
}
|
||||
} else {
|
||||
item.decreaseQualityByOne();
|
||||
}
|
||||
|
||||
item.decreaseSellInEachDay();
|
||||
item.decreaseSellInEachDay();
|
||||
|
||||
if (item.sellIn < 0) {
|
||||
if (isBackstagePasses) {
|
||||
item.quality = 0;
|
||||
} else {
|
||||
if (item.sellIn < 0) {
|
||||
item.decreaseQualityByOne();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user