|
@@ -22,9 +22,11 @@ public class Inventory {
|
22
|
22
|
}
|
23
|
23
|
|
24
|
24
|
public void updateQuality(Item item){
|
25
|
|
- if (item.getName().equals("Aged Brie")
|
26
|
|
- || item.getName().equals("Backstage passes to a TAFKAL80ETC concert")) {
|
27
|
|
- //level 2 - quality
|
|
25
|
+ if (item.getName().equals("Aged Brie")){
|
|
26
|
+ if (item.getQuality() < 50) {
|
|
27
|
+ increaseQualityBy1(item);
|
|
28
|
+ }
|
|
29
|
+ } else if (item.getName().equals("Backstage passes to a TAFKAL80ETC concert")) {
|
28
|
30
|
if (item.getQuality() < 50) {
|
29
|
31
|
increaseQualityBy1(item);
|
30
|
32
|
//level 3 - item type
|