From 30891b6dd01a57d6ee60dd35307da9d6d5b9a954 Mon Sep 17 00:00:00 2001 From: Ahmed Abdeen Date: Thu, 16 Jan 2025 02:13:05 +0100 Subject: [PATCH] feat: conjured-items - Updated the extra junit test to make it succeed and added more tests. --- .../main/java/com/gildedrose/GildedRose.java | 79 ++-- .../com/gildedrose/strategy/ItemStrategy.java | 9 + ...pl.java => LegendaryItemStrategyImpl.java} | 2 +- .../java/com/gildedrose/GildedRoseTest.java | 82 +++- texttests/ThirtyDays/stdout-original.gr | 373 ------------------ 5 files changed, 127 insertions(+), 418 deletions(-) rename Java/src/main/java/com/gildedrose/strategy/{SulfurasItemStrategyImpl.java => LegendaryItemStrategyImpl.java} (73%) delete mode 100644 texttests/ThirtyDays/stdout-original.gr diff --git a/Java/src/main/java/com/gildedrose/GildedRose.java b/Java/src/main/java/com/gildedrose/GildedRose.java index c49c4ddb..08fd11e1 100644 --- a/Java/src/main/java/com/gildedrose/GildedRose.java +++ b/Java/src/main/java/com/gildedrose/GildedRose.java @@ -4,58 +4,61 @@ import com.gildedrose.strategy.AgedBrieItemStrategyImpl; import com.gildedrose.strategy.BackStageItemStrategyImpl; import com.gildedrose.strategy.ConjuredItemStrategyImpl; import com.gildedrose.strategy.ItemStrategy; -import com.gildedrose.strategy.SulfurasItemStrategyImpl; +import com.gildedrose.strategy.LegendaryItemStrategyImpl; import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.TreeMap; class GildedRose { - private static final ItemStrategy DEFAULT_STRATEGY = new ItemStrategy() { - }; - private static final Map STRATEGIES = new TreeMap<>(); + static final ItemStrategy DEFAULT_STRATEGY = new ItemStrategy() { + }; + private static final Map STRATEGIES = new TreeMap<>(); - static final String AGED_BRIE = "Aged Brie"; - static final String CONJURED = "Conjured Mana Cake"; - static final String DEXTERITY_VEST = "+5 Dexterity Vest"; - static final String SULFURAS = "Sulfuras, Hand of Ragnaros"; - static final String ELIXIR_OF_THE_MONGOOSE = "Elixir of the Mongoose"; - static final String BACKSTAGE_PASSES = "Backstage passes to a TAFKAL80ETC concert"; + static final String AGED_BRIE = "Aged Brie"; + static final String CONJURED = "Conjured Mana Cake"; + static final String DEXTERITY_VEST = "+5 Dexterity Vest"; + static final String SULFURAS = "Sulfuras, Hand of Ragnaros"; + static final String ELIXIR_OF_THE_MONGOOSE = "Elixir of the Mongoose"; + static final String BACKSTAGE_PASSES = "Backstage passes to a TAFKAL80ETC concert"; - private static final List KNOWN_ITEM_NAMES = - List.of(AGED_BRIE, CONJURED, DEXTERITY_VEST, SULFURAS, ELIXIR_OF_THE_MONGOOSE, - BACKSTAGE_PASSES); + private static final List KNOWN_ITEM_NAMES = + List.of(AGED_BRIE, CONJURED, DEXTERITY_VEST, SULFURAS, ELIXIR_OF_THE_MONGOOSE, + BACKSTAGE_PASSES); - static { - STRATEGIES.put(DEXTERITY_VEST, DEFAULT_STRATEGY); - STRATEGIES.put(ELIXIR_OF_THE_MONGOOSE, DEFAULT_STRATEGY); - STRATEGIES.put(AGED_BRIE, new AgedBrieItemStrategyImpl()); - STRATEGIES.put(CONJURED, new ConjuredItemStrategyImpl()); - STRATEGIES.put(SULFURAS, new SulfurasItemStrategyImpl()); - STRATEGIES.put(BACKSTAGE_PASSES, new BackStageItemStrategyImpl()); - } + static { + STRATEGIES.put(DEXTERITY_VEST, DEFAULT_STRATEGY); + STRATEGIES.put(ELIXIR_OF_THE_MONGOOSE, DEFAULT_STRATEGY); - private final Item[] items; + STRATEGIES.put(AGED_BRIE, new AgedBrieItemStrategyImpl()); + STRATEGIES.put(CONJURED, new ConjuredItemStrategyImpl()); + STRATEGIES.put(BACKSTAGE_PASSES, new BackStageItemStrategyImpl()); - public GildedRose(Item[] items) { - if (items == null || items.length == 0) { - throw new IllegalArgumentException("Items cannot be empty"); + STRATEGIES.put(SULFURAS, new LegendaryItemStrategyImpl()); } - this.items = items; - } - public void updateQuality() { - Arrays.stream(items).forEach(item -> findStrategy(item).updateQuality(item)); - } + private final Item[] items; - private ItemStrategy findStrategy(Item item) { - if (KNOWN_ITEM_NAMES.contains(item.name)) { - return STRATEGIES.get(item.name); + public GildedRose(Item[] items) { + if (items == null || items.length == 0) { + throw new IllegalArgumentException("Items cannot be empty"); + } + this.items = items; } - return DEFAULT_STRATEGY; - } - public Item[] getItems() { - return items; - } + public void updateQuality() { + Arrays.stream(items) + .forEach(item -> GildedRose.findStrategy(item.name).updateQuality(item)); + } + + static ItemStrategy findStrategy(String itemName) { + if (KNOWN_ITEM_NAMES.contains(itemName)) { + return STRATEGIES.get(itemName); + } + return DEFAULT_STRATEGY; + } + + public Item[] getItems() { + return items; + } } diff --git a/Java/src/main/java/com/gildedrose/strategy/ItemStrategy.java b/Java/src/main/java/com/gildedrose/strategy/ItemStrategy.java index 5505a0d6..2abe6ae6 100644 --- a/Java/src/main/java/com/gildedrose/strategy/ItemStrategy.java +++ b/Java/src/main/java/com/gildedrose/strategy/ItemStrategy.java @@ -2,12 +2,21 @@ package com.gildedrose.strategy; import com.gildedrose.Item; +/** + * Defines the strategy for updating the quality and sellIn of an item. + */ public interface ItemStrategy { int MINIMUM_QUALITY = 0; int MAXIMUM_QUALITY = 50; int DEGRADATION_RATE = 1; int INCREASE_RATE = 1; + /** + * Updates the quality of a normal item. Degradation rate is doubled after sellIn. + * Specialized item types should override this method. + * + * @param item The item to update + */ default void updateQuality(Item item) { item.sellIn--; int decrement = item.sellIn < 0 ? 2 * DEGRADATION_RATE : DEGRADATION_RATE; diff --git a/Java/src/main/java/com/gildedrose/strategy/SulfurasItemStrategyImpl.java b/Java/src/main/java/com/gildedrose/strategy/LegendaryItemStrategyImpl.java similarity index 73% rename from Java/src/main/java/com/gildedrose/strategy/SulfurasItemStrategyImpl.java rename to Java/src/main/java/com/gildedrose/strategy/LegendaryItemStrategyImpl.java index e74cded5..3dc290c5 100644 --- a/Java/src/main/java/com/gildedrose/strategy/SulfurasItemStrategyImpl.java +++ b/Java/src/main/java/com/gildedrose/strategy/LegendaryItemStrategyImpl.java @@ -2,7 +2,7 @@ package com.gildedrose.strategy; import com.gildedrose.Item; -public class SulfurasItemStrategyImpl implements ItemStrategy { +public class LegendaryItemStrategyImpl implements ItemStrategy { @Override public void updateQuality(Item item) { // Quality remains unchanged. Not for sale! diff --git a/Java/src/test/java/com/gildedrose/GildedRoseTest.java b/Java/src/test/java/com/gildedrose/GildedRoseTest.java index 701cb41c..30d96a40 100644 --- a/Java/src/test/java/com/gildedrose/GildedRoseTest.java +++ b/Java/src/test/java/com/gildedrose/GildedRoseTest.java @@ -2,16 +2,86 @@ package com.gildedrose; import static org.junit.jupiter.api.Assertions.assertEquals; +import com.gildedrose.strategy.AgedBrieItemStrategyImpl; +import com.gildedrose.strategy.BackStageItemStrategyImpl; +import com.gildedrose.strategy.ConjuredItemStrategyImpl; +import com.gildedrose.strategy.LegendaryItemStrategyImpl; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; class GildedRoseTest { @Test - void test() { + @DisplayName("Constructor accepts non-empty input") + void shouldConstructWithNonEmptyItems() { + Item[] items = new Item[] {new Item(GildedRose.AGED_BRIE, 0, 4)}; + Assertions.assertDoesNotThrow(() -> new GildedRose(items)); + } + + @Test + @DisplayName("Constructor throws an exception for null input") + void shouldThrowExceptionForNullInput() { + Assertions.assertThrows(IllegalArgumentException.class, () -> new GildedRose(null)); + } + + @Test + @DisplayName("Constructor throws an exception for empty input") + void shouldThrowExceptionForEmptyItemArray() { + Item[] items = new Item[] {}; + Assertions.assertThrows(IllegalArgumentException.class, () -> new GildedRose(items)); + } + + @Test + @DisplayName("Conjured item - Quality degrades twice as fast after sell in") + void shouldDegradeConjuredItemAfterSellIn() { Item[] items = new Item[] {new Item(GildedRose.CONJURED, -1, 4)}; - GildedRose app = new GildedRose(items); - app.updateQuality(); - assertEquals(GildedRose.CONJURED, app.getItems()[0].name); - assertEquals(0, app.getItems()[0].quality); - assertEquals(-2, app.getItems()[0].sellIn); + GildedRose gildedRose = new GildedRose(items); + gildedRose.updateQuality(); + assertEquals(GildedRose.CONJURED, gildedRose.getItems()[0].name); + assertEquals(0, gildedRose.getItems()[0].quality); + assertEquals(-2, gildedRose.getItems()[0].sellIn); + } + + @Test + @DisplayName("Should return default strategy for unknown item") + void shouldReturnDefaultStrategyForUnknownItem() { + assertEquals(GildedRose.DEFAULT_STRATEGY, GildedRose.findStrategy("unknown")); + } + + @Test + @DisplayName("Should return default strategy for default items") + void shouldReturnDefaultStrategyForDefaultItems() { + assertEquals(GildedRose.DEFAULT_STRATEGY, + GildedRose.findStrategy(GildedRose.DEXTERITY_VEST)); + assertEquals(GildedRose.DEFAULT_STRATEGY, + GildedRose.findStrategy(GildedRose.ELIXIR_OF_THE_MONGOOSE)); + } + + @Test + @DisplayName("Should return Aged Brie strategy for Aged Brie item") + void shouldReturnAgedBrieStrategy() { + assertEquals(AgedBrieItemStrategyImpl.class, + GildedRose.findStrategy(GildedRose.AGED_BRIE).getClass()); + } + + @Test + @DisplayName("Should return Conjured strategy for Conjured item") + void shouldReturnConjuredStrategy() { + assertEquals(ConjuredItemStrategyImpl.class, + GildedRose.findStrategy(GildedRose.CONJURED).getClass()); + } + + @Test + @DisplayName("Should return Legendary strategy for Legendary item") + void shouldReturnLegendaryItemStrategy() { + assertEquals(LegendaryItemStrategyImpl.class, + GildedRose.findStrategy(GildedRose.SULFURAS).getClass()); + } + + @Test + @DisplayName("Should return Backstage Passes strategy for Backstage Passes item") + void shouldReturnBackstagePassesStrategy() { + assertEquals(BackStageItemStrategyImpl.class, + GildedRose.findStrategy(GildedRose.BACKSTAGE_PASSES).getClass()); } } diff --git a/texttests/ThirtyDays/stdout-original.gr b/texttests/ThirtyDays/stdout-original.gr deleted file mode 100644 index a04e48ac..00000000 --- a/texttests/ThirtyDays/stdout-original.gr +++ /dev/null @@ -1,373 +0,0 @@ -OMGHAI! --------- day 0 -------- -name, sellIn, quality -+5 Dexterity Vest, 10, 20 -Aged Brie, 2, 0 -Elixir of the Mongoose, 5, 7 -Sulfuras, Hand of Ragnaros, 0, 80 -Sulfuras, Hand of Ragnaros, -1, 80 -Backstage passes to a TAFKAL80ETC concert, 15, 20 -Backstage passes to a TAFKAL80ETC concert, 10, 49 -Backstage passes to a TAFKAL80ETC concert, 5, 49 -Conjured Mana Cake, 3, 6 - --------- day 1 -------- -name, sellIn, quality -+5 Dexterity Vest, 9, 19 -Aged Brie, 1, 1 -Elixir of the Mongoose, 4, 6 -Sulfuras, Hand of Ragnaros, 0, 80 -Sulfuras, Hand of Ragnaros, -1, 80 -Backstage passes to a TAFKAL80ETC concert, 14, 21 -Backstage passes to a TAFKAL80ETC concert, 9, 50 -Backstage passes to a TAFKAL80ETC concert, 4, 50 -Conjured Mana Cake, 2, 5 - --------- day 2 -------- -name, sellIn, quality -+5 Dexterity Vest, 8, 18 -Aged Brie, 0, 2 -Elixir of the Mongoose, 3, 5 -Sulfuras, Hand of Ragnaros, 0, 80 -Sulfuras, Hand of Ragnaros, -1, 80 -Backstage passes to a TAFKAL80ETC concert, 13, 22 -Backstage passes to a TAFKAL80ETC concert, 8, 50 -Backstage passes to a TAFKAL80ETC concert, 3, 50 -Conjured Mana Cake, 1, 4 - --------- day 3 -------- -name, sellIn, quality -+5 Dexterity Vest, 7, 17 -Aged Brie, -1, 4 -Elixir of the Mongoose, 2, 4 -Sulfuras, Hand of Ragnaros, 0, 80 -Sulfuras, Hand of Ragnaros, -1, 80 -Backstage passes to a TAFKAL80ETC concert, 12, 23 -Backstage passes to a TAFKAL80ETC concert, 7, 50 -Backstage passes to a TAFKAL80ETC concert, 2, 50 -Conjured Mana Cake, 0, 3 - --------- day 4 -------- -name, sellIn, quality -+5 Dexterity Vest, 6, 16 -Aged Brie, -2, 6 -Elixir of the Mongoose, 1, 3 -Sulfuras, Hand of Ragnaros, 0, 80 -Sulfuras, Hand of Ragnaros, -1, 80 -Backstage passes to a TAFKAL80ETC concert, 11, 24 -Backstage passes to a TAFKAL80ETC concert, 6, 50 -Backstage passes to a TAFKAL80ETC concert, 1, 50 -Conjured Mana Cake, -1, 1 - --------- day 5 -------- -name, sellIn, quality -+5 Dexterity Vest, 5, 15 -Aged Brie, -3, 8 -Elixir of the Mongoose, 0, 2 -Sulfuras, Hand of Ragnaros, 0, 80 -Sulfuras, Hand of Ragnaros, -1, 80 -Backstage passes to a TAFKAL80ETC concert, 10, 25 -Backstage passes to a TAFKAL80ETC concert, 5, 50 -Backstage passes to a TAFKAL80ETC concert, 0, 50 -Conjured Mana Cake, -2, 0 - --------- day 6 -------- -name, sellIn, quality -+5 Dexterity Vest, 4, 14 -Aged Brie, -4, 10 -Elixir of the Mongoose, -1, 0 -Sulfuras, Hand of Ragnaros, 0, 80 -Sulfuras, Hand of Ragnaros, -1, 80 -Backstage passes to a TAFKAL80ETC concert, 9, 27 -Backstage passes to a TAFKAL80ETC concert, 4, 50 -Backstage passes to a TAFKAL80ETC concert, -1, 0 -Conjured Mana Cake, -3, 0 - --------- day 7 -------- -name, sellIn, quality -+5 Dexterity Vest, 3, 13 -Aged Brie, -5, 12 -Elixir of the Mongoose, -2, 0 -Sulfuras, Hand of Ragnaros, 0, 80 -Sulfuras, Hand of Ragnaros, -1, 80 -Backstage passes to a TAFKAL80ETC concert, 8, 29 -Backstage passes to a TAFKAL80ETC concert, 3, 50 -Backstage passes to a TAFKAL80ETC concert, -2, 0 -Conjured Mana Cake, -4, 0 - --------- day 8 -------- -name, sellIn, quality -+5 Dexterity Vest, 2, 12 -Aged Brie, -6, 14 -Elixir of the Mongoose, -3, 0 -Sulfuras, Hand of Ragnaros, 0, 80 -Sulfuras, Hand of Ragnaros, -1, 80 -Backstage passes to a TAFKAL80ETC concert, 7, 31 -Backstage passes to a TAFKAL80ETC concert, 2, 50 -Backstage passes to a TAFKAL80ETC concert, -3, 0 -Conjured Mana Cake, -5, 0 - --------- day 9 -------- -name, sellIn, quality -+5 Dexterity Vest, 1, 11 -Aged Brie, -7, 16 -Elixir of the Mongoose, -4, 0 -Sulfuras, Hand of Ragnaros, 0, 80 -Sulfuras, Hand of Ragnaros, -1, 80 -Backstage passes to a TAFKAL80ETC concert, 6, 33 -Backstage passes to a TAFKAL80ETC concert, 1, 50 -Backstage passes to a TAFKAL80ETC concert, -4, 0 -Conjured Mana Cake, -6, 0 - --------- day 10 -------- -name, sellIn, quality -+5 Dexterity Vest, 0, 10 -Aged Brie, -8, 18 -Elixir of the Mongoose, -5, 0 -Sulfuras, Hand of Ragnaros, 0, 80 -Sulfuras, Hand of Ragnaros, -1, 80 -Backstage passes to a TAFKAL80ETC concert, 5, 35 -Backstage passes to a TAFKAL80ETC concert, 0, 50 -Backstage passes to a TAFKAL80ETC concert, -5, 0 -Conjured Mana Cake, -7, 0 - --------- day 11 -------- -name, sellIn, quality -+5 Dexterity Vest, -1, 8 -Aged Brie, -9, 20 -Elixir of the Mongoose, -6, 0 -Sulfuras, Hand of Ragnaros, 0, 80 -Sulfuras, Hand of Ragnaros, -1, 80 -Backstage passes to a TAFKAL80ETC concert, 4, 38 -Backstage passes to a TAFKAL80ETC concert, -1, 0 -Backstage passes to a TAFKAL80ETC concert, -6, 0 -Conjured Mana Cake, -8, 0 - --------- day 12 -------- -name, sellIn, quality -+5 Dexterity Vest, -2, 6 -Aged Brie, -10, 22 -Elixir of the Mongoose, -7, 0 -Sulfuras, Hand of Ragnaros, 0, 80 -Sulfuras, Hand of Ragnaros, -1, 80 -Backstage passes to a TAFKAL80ETC concert, 3, 41 -Backstage passes to a TAFKAL80ETC concert, -2, 0 -Backstage passes to a TAFKAL80ETC concert, -7, 0 -Conjured Mana Cake, -9, 0 - --------- day 13 -------- -name, sellIn, quality -+5 Dexterity Vest, -3, 4 -Aged Brie, -11, 24 -Elixir of the Mongoose, -8, 0 -Sulfuras, Hand of Ragnaros, 0, 80 -Sulfuras, Hand of Ragnaros, -1, 80 -Backstage passes to a TAFKAL80ETC concert, 2, 44 -Backstage passes to a TAFKAL80ETC concert, -3, 0 -Backstage passes to a TAFKAL80ETC concert, -8, 0 -Conjured Mana Cake, -10, 0 - --------- day 14 -------- -name, sellIn, quality -+5 Dexterity Vest, -4, 2 -Aged Brie, -12, 26 -Elixir of the Mongoose, -9, 0 -Sulfuras, Hand of Ragnaros, 0, 80 -Sulfuras, Hand of Ragnaros, -1, 80 -Backstage passes to a TAFKAL80ETC concert, 1, 47 -Backstage passes to a TAFKAL80ETC concert, -4, 0 -Backstage passes to a TAFKAL80ETC concert, -9, 0 -Conjured Mana Cake, -11, 0 - --------- day 15 -------- -name, sellIn, quality -+5 Dexterity Vest, -5, 0 -Aged Brie, -13, 28 -Elixir of the Mongoose, -10, 0 -Sulfuras, Hand of Ragnaros, 0, 80 -Sulfuras, Hand of Ragnaros, -1, 80 -Backstage passes to a TAFKAL80ETC concert, 0, 50 -Backstage passes to a TAFKAL80ETC concert, -5, 0 -Backstage passes to a TAFKAL80ETC concert, -10, 0 -Conjured Mana Cake, -12, 0 - --------- day 16 -------- -name, sellIn, quality -+5 Dexterity Vest, -6, 0 -Aged Brie, -14, 30 -Elixir of the Mongoose, -11, 0 -Sulfuras, Hand of Ragnaros, 0, 80 -Sulfuras, Hand of Ragnaros, -1, 80 -Backstage passes to a TAFKAL80ETC concert, -1, 0 -Backstage passes to a TAFKAL80ETC concert, -6, 0 -Backstage passes to a TAFKAL80ETC concert, -11, 0 -Conjured Mana Cake, -13, 0 - --------- day 17 -------- -name, sellIn, quality -+5 Dexterity Vest, -7, 0 -Aged Brie, -15, 32 -Elixir of the Mongoose, -12, 0 -Sulfuras, Hand of Ragnaros, 0, 80 -Sulfuras, Hand of Ragnaros, -1, 80 -Backstage passes to a TAFKAL80ETC concert, -2, 0 -Backstage passes to a TAFKAL80ETC concert, -7, 0 -Backstage passes to a TAFKAL80ETC concert, -12, 0 -Conjured Mana Cake, -14, 0 - --------- day 18 -------- -name, sellIn, quality -+5 Dexterity Vest, -8, 0 -Aged Brie, -16, 34 -Elixir of the Mongoose, -13, 0 -Sulfuras, Hand of Ragnaros, 0, 80 -Sulfuras, Hand of Ragnaros, -1, 80 -Backstage passes to a TAFKAL80ETC concert, -3, 0 -Backstage passes to a TAFKAL80ETC concert, -8, 0 -Backstage passes to a TAFKAL80ETC concert, -13, 0 -Conjured Mana Cake, -15, 0 - --------- day 19 -------- -name, sellIn, quality -+5 Dexterity Vest, -9, 0 -Aged Brie, -17, 36 -Elixir of the Mongoose, -14, 0 -Sulfuras, Hand of Ragnaros, 0, 80 -Sulfuras, Hand of Ragnaros, -1, 80 -Backstage passes to a TAFKAL80ETC concert, -4, 0 -Backstage passes to a TAFKAL80ETC concert, -9, 0 -Backstage passes to a TAFKAL80ETC concert, -14, 0 -Conjured Mana Cake, -16, 0 - --------- day 20 -------- -name, sellIn, quality -+5 Dexterity Vest, -10, 0 -Aged Brie, -18, 38 -Elixir of the Mongoose, -15, 0 -Sulfuras, Hand of Ragnaros, 0, 80 -Sulfuras, Hand of Ragnaros, -1, 80 -Backstage passes to a TAFKAL80ETC concert, -5, 0 -Backstage passes to a TAFKAL80ETC concert, -10, 0 -Backstage passes to a TAFKAL80ETC concert, -15, 0 -Conjured Mana Cake, -17, 0 - --------- day 21 -------- -name, sellIn, quality -+5 Dexterity Vest, -11, 0 -Aged Brie, -19, 40 -Elixir of the Mongoose, -16, 0 -Sulfuras, Hand of Ragnaros, 0, 80 -Sulfuras, Hand of Ragnaros, -1, 80 -Backstage passes to a TAFKAL80ETC concert, -6, 0 -Backstage passes to a TAFKAL80ETC concert, -11, 0 -Backstage passes to a TAFKAL80ETC concert, -16, 0 -Conjured Mana Cake, -18, 0 - --------- day 22 -------- -name, sellIn, quality -+5 Dexterity Vest, -12, 0 -Aged Brie, -20, 42 -Elixir of the Mongoose, -17, 0 -Sulfuras, Hand of Ragnaros, 0, 80 -Sulfuras, Hand of Ragnaros, -1, 80 -Backstage passes to a TAFKAL80ETC concert, -7, 0 -Backstage passes to a TAFKAL80ETC concert, -12, 0 -Backstage passes to a TAFKAL80ETC concert, -17, 0 -Conjured Mana Cake, -19, 0 - --------- day 23 -------- -name, sellIn, quality -+5 Dexterity Vest, -13, 0 -Aged Brie, -21, 44 -Elixir of the Mongoose, -18, 0 -Sulfuras, Hand of Ragnaros, 0, 80 -Sulfuras, Hand of Ragnaros, -1, 80 -Backstage passes to a TAFKAL80ETC concert, -8, 0 -Backstage passes to a TAFKAL80ETC concert, -13, 0 -Backstage passes to a TAFKAL80ETC concert, -18, 0 -Conjured Mana Cake, -20, 0 - --------- day 24 -------- -name, sellIn, quality -+5 Dexterity Vest, -14, 0 -Aged Brie, -22, 46 -Elixir of the Mongoose, -19, 0 -Sulfuras, Hand of Ragnaros, 0, 80 -Sulfuras, Hand of Ragnaros, -1, 80 -Backstage passes to a TAFKAL80ETC concert, -9, 0 -Backstage passes to a TAFKAL80ETC concert, -14, 0 -Backstage passes to a TAFKAL80ETC concert, -19, 0 -Conjured Mana Cake, -21, 0 - --------- day 25 -------- -name, sellIn, quality -+5 Dexterity Vest, -15, 0 -Aged Brie, -23, 48 -Elixir of the Mongoose, -20, 0 -Sulfuras, Hand of Ragnaros, 0, 80 -Sulfuras, Hand of Ragnaros, -1, 80 -Backstage passes to a TAFKAL80ETC concert, -10, 0 -Backstage passes to a TAFKAL80ETC concert, -15, 0 -Backstage passes to a TAFKAL80ETC concert, -20, 0 -Conjured Mana Cake, -22, 0 - --------- day 26 -------- -name, sellIn, quality -+5 Dexterity Vest, -16, 0 -Aged Brie, -24, 50 -Elixir of the Mongoose, -21, 0 -Sulfuras, Hand of Ragnaros, 0, 80 -Sulfuras, Hand of Ragnaros, -1, 80 -Backstage passes to a TAFKAL80ETC concert, -11, 0 -Backstage passes to a TAFKAL80ETC concert, -16, 0 -Backstage passes to a TAFKAL80ETC concert, -21, 0 -Conjured Mana Cake, -23, 0 - --------- day 27 -------- -name, sellIn, quality -+5 Dexterity Vest, -17, 0 -Aged Brie, -25, 50 -Elixir of the Mongoose, -22, 0 -Sulfuras, Hand of Ragnaros, 0, 80 -Sulfuras, Hand of Ragnaros, -1, 80 -Backstage passes to a TAFKAL80ETC concert, -12, 0 -Backstage passes to a TAFKAL80ETC concert, -17, 0 -Backstage passes to a TAFKAL80ETC concert, -22, 0 -Conjured Mana Cake, -24, 0 - --------- day 28 -------- -name, sellIn, quality -+5 Dexterity Vest, -18, 0 -Aged Brie, -26, 50 -Elixir of the Mongoose, -23, 0 -Sulfuras, Hand of Ragnaros, 0, 80 -Sulfuras, Hand of Ragnaros, -1, 80 -Backstage passes to a TAFKAL80ETC concert, -13, 0 -Backstage passes to a TAFKAL80ETC concert, -18, 0 -Backstage passes to a TAFKAL80ETC concert, -23, 0 -Conjured Mana Cake, -25, 0 - --------- day 29 -------- -name, sellIn, quality -+5 Dexterity Vest, -19, 0 -Aged Brie, -27, 50 -Elixir of the Mongoose, -24, 0 -Sulfuras, Hand of Ragnaros, 0, 80 -Sulfuras, Hand of Ragnaros, -1, 80 -Backstage passes to a TAFKAL80ETC concert, -14, 0 -Backstage passes to a TAFKAL80ETC concert, -19, 0 -Backstage passes to a TAFKAL80ETC concert, -24, 0 -Conjured Mana Cake, -26, 0 - --------- day 30 -------- -name, sellIn, quality -+5 Dexterity Vest, -20, 0 -Aged Brie, -28, 50 -Elixir of the Mongoose, -25, 0 -Sulfuras, Hand of Ragnaros, 0, 80 -Sulfuras, Hand of Ragnaros, -1, 80 -Backstage passes to a TAFKAL80ETC concert, -15, 0 -Backstage passes to a TAFKAL80ETC concert, -20, 0 -Backstage passes to a TAFKAL80ETC concert, -25, 0 -Conjured Mana Cake, -27, 0 -