Eric Foster 6 lat temu
rodzic
commit
0710a7eedc
1 zmienionych plików z 4 dodań i 3 usunięć
  1. 4
    3
      Inventory.java

+ 4
- 3
Inventory.java Wyświetl plik

@@ -31,10 +31,11 @@ public class Inventory {
31 31
     }
32 32
 
33 33
     public void updateQualityForAgedItems(Item item){
34
-        if (item.getQuality() < 50) {
34
+        if (item.getName().equals("Aged Brie") && item.getQuality() < 50) {
35
+            increaseQualityBy1(item);
36
+        } else if (item.getName().equals("Backstage passes to a TAFKAL80ETC concert") &&
37
+        item.getQuality() < 50){
35 38
             increaseQualityBy1(item);
36
-        }
37
-        if (item.getName().equals("Backstage passes to a TAFKAL80ETC concert")){
38 39
             if (item.getSellIn() < 11 && item.getQuality() < 50) {
39 40
                 increaseQualityBy1(item);
40 41
             }