|
@@ -9,7 +9,9 @@ public class Inventory {
|
9
|
9
|
|
10
|
10
|
public void updateInventory() {
|
11
|
11
|
for (int i = 0; i < items.length; i++) {
|
12
|
|
- if(!items[i].getName().equals("Sulfuras, Hand of Ragnaros")){
|
|
12
|
+ if(items[i].getName().equals("Sulfuras, Hand of Ragnaros")){
|
|
13
|
+ break;
|
|
14
|
+ } else {
|
13
|
15
|
updateQuality(items[i]);
|
14
|
16
|
updateSellInDays(items[i]);
|
15
|
17
|
if (items[i].getSellIn() < 0) {
|
|
@@ -62,7 +64,7 @@ public class Inventory {
|
62
|
64
|
reduceQualityBy1(item);
|
63
|
65
|
}
|
64
|
66
|
}
|
65
|
|
-
|
|
67
|
+
|
66
|
68
|
public void reduceQualityBy1(Item item){
|
67
|
69
|
item.setQuality(item.getQuality() -1);
|
68
|
70
|
}
|