src/main/java/com/gildedrose/GildedRose.java
/*
     * System in place that updates our inventory for us. It was developed by a no-nonsense type named
	 * Leeroy, who has moved on to new adventures.
     */
System in place that updates our inventory for us. It was developed by a no-nonsense type named
Leeroy, who has moved on to new adventures.
System in place that updates our inventory for us . It was developed by a no - nonsense type named Leeroy who has moved on to new adventures .
public void updateQualityLeeroy() {
        for (int i = 0; i < items.length; i++) {
            if (!items[i].name.equals("Aged Brie")
                    && !items[i].name.equals("Backstage passes to a TAFKAL80ETC concert")) {
                if (items[i].quality > 0) {
                    if (!items[i].name.equals("Sulfuras, Hand of Ragnaros")) {
                        items[i].quality = items[i].quality - 1;
                    }
                }
            } else {
                if (items[i].quality < 50) {
                    items[i].quality = items[i].quality + 1;
                    if (items[i].name.equals("Backstage passes to a TAFKAL80ETC concert")) {
                        if (items[i].sellIn < 11) {
                            if (items[i].quality < 50) {
                                items[i].quality = items[i].quality + 1;
                            }
                        }
                        if (items[i].sellIn < 6) {
                            if (items[i].quality < 50) {
                                items[i].quality = items[i].quality + 1;
                            }
                        }
                    }
                }
            }
            if (!items[i].name.equals("Sulfuras, Hand of Ragnaros")) {
                items[i].sellIn = items[i].sellIn - 1;
            }
            if (items[i].sellIn < 0) {
                if (!items[i].name.equals("Aged Brie")) {
                    if (!items[i].name.equals("Backstage passes to a TAFKAL80ETC concert")) {
                        if (items[i].quality > 0) {
                            if (!items[i].name.equals("Sulfuras, Hand of Ragnaros")) {
                                items[i].quality = items[i].quality - 1;
                            }
                        }
                    } else {
                        items[i].quality = items[i].quality - items[i].quality;
                    }
                } else {
                    if (items[i].quality < 50) {
                        items[i].quality = items[i].quality + 1;
                    }
                }
            }
        }
    }
public void updateQualityLeeroy ( ) { for ( int i = 0 ; i < items . length ; i ++ ) { if ( ! items [ i ] . name . equals ( "Aged Brie" ) && ! items [ i ] . name . equals ( "Backstage passes to a TAFKAL80ETC concert" ) ) { if ( items [ i ] . quality > 0 ) { if ( ! items [ i ] . name . equals ( "Sulfuras, Hand of Ragnaros" ) ) { items [ i ] . quality = items [ i ] . quality - 1 ; } } } else { if ( items [ i ] . quality < 50 ) { items [ i ] . quality = items [ i ] . quality + 1 ; if ( items [ i ] . name . equals ( "Backstage passes to a TAFKAL80ETC concert" ) ) { if ( items [ i ] . sellIn < 11 ) { if ( items [ i ] . quality < 50 ) { items [ i ] . quality = items [ i ] . quality + 1 ; } } if ( items [ i ] . sellIn < 6 ) { if ( items [ i ] . quality < 50 ) { items [ i ] . quality = items [ i ] . quality + 1 ; } } } } } if ( ! items [ i ] . name . equals ( "Sulfuras, Hand of Ragnaros" ) ) { items [ i ] . sellIn = items [ i ] . sellIn - 1 ; } if ( items [ i ] . sellIn < 0 ) { if ( ! items [ i ] . name . equals ( "Aged Brie" ) ) { if ( ! items [ i ] . name . equals ( "Backstage passes to a TAFKAL80ETC concert" ) ) { if ( items [ i ] . quality > 0 ) { if ( ! items [ i ] . name . equals ( "Sulfuras, Hand of Ragnaros" ) ) { items [ i ] . quality = items [ i ] . quality - 1 ; } } } else { items [ i ] . quality = items [ i ] . quality - items [ i ] . quality ; } } else { if ( items [ i ] . quality < 50 ) { items [ i ] . quality = items [ i ] . quality + 1 ; } } } } }
System in place that updates our inventory for us.
System in place that updates our inventory for us .