Update extracted expired

This commit is contained in:
Jon 2022-02-18 17:27:37 +00:00
parent 617871422e
commit 00763585f8

View File

@ -51,8 +51,18 @@ class GildedRose {
} }
// ----- Block 3 ----- Item sell date is less than 0 // ----- Block 3 ----- Item sell date is less than 0
handleIfExpired(item);
}
}
private void handleIfExpired(Item item) {
if (item.sellIn < 0) { if (item.sellIn < 0) {
handleExpired(item);
}
}
private void handleExpired(Item item) {
// Reduce quality of items by - 1 if greater than 0 and not AB, BptaTc or SHoR // Reduce quality of items by - 1 if greater than 0 and not AB, BptaTc or SHoR
if (!item.name.equals("Aged Brie")) { if (!item.name.equals("Aged Brie")) {
if (!item.name.equals("Backstage passes to a TAFKAL80ETC concert")) { if (!item.name.equals("Backstage passes to a TAFKAL80ETC concert")) {
@ -73,6 +83,4 @@ class GildedRose {
} }
} }
} }
}
}
} }