|
|
@@ -1,14 +1,15 @@
|
|
1
|
1
|
|
|
2
|
2
|
public class Inventory {
|
|
3
|
3
|
private Item[] items;
|
|
4
|
|
-
|
|
|
4
|
+ int i; //removed for loop, defined i in Constructor
|
|
5
|
5
|
public Inventory(Item[] items) {
|
|
6
|
6
|
super();
|
|
7
|
7
|
this.items = items;
|
|
|
8
|
+ i = 0;
|
|
8
|
9
|
}
|
|
9
|
10
|
|
|
10
|
11
|
public void updateQuality() {
|
|
11
|
|
- for (int i = 0; i < items.length; i++) {
|
|
|
12
|
+
|
|
12
|
13
|
if (!items[i].getName().equals("Aged Brie")) {
|
|
13
|
14
|
if (items[i].getQuality() > 0) {
|
|
14
|
15
|
if (!items[i].getName().equals("Sulfuras, Hand of Ragnaros")) {
|
|
|
@@ -36,4 +37,4 @@ public class Inventory {
|
|
36
|
37
|
}
|
|
37
|
38
|
}
|
|
38
|
39
|
}
|
|
39
|
|
-}
|
|
|
40
|
+
|