From 0e11a9fa76161e19f33c8c15d78b930f0452b79d Mon Sep 17 00:00:00 2001 From: Ben Hemann Date: Mon, 7 Jun 2021 16:49:20 -0500 Subject: [PATCH] variable name change, hand -> ragnaros, pass -> concertPass; ; --- TypeScript/app/gilded-rose.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/TypeScript/app/gilded-rose.ts b/TypeScript/app/gilded-rose.ts index 5f18f0af..0604aa0b 100644 --- a/TypeScript/app/gilded-rose.ts +++ b/TypeScript/app/gilded-rose.ts @@ -23,18 +23,18 @@ export class GildedRose { var maxQuality = 50; var minQuality = 0; var conjured = 'Conjured'; - var hand = 'Sulfuras, Hand of Ragnaros'; + var ragnaros = 'Sulfuras, Hand of Ragnaros'; var cheese = 'Aged Brie'; - var pass = 'Backstage passes to a TAFKAL80ETC concert'; + var concertPass = 'Backstage passes to a TAFKAL80ETC concert'; for (let i = 0; i < this.items.length; i++) { - if (this.items[i].name != cheese && this.items[i].name != pass - && this.items[i].name != hand && this.items[i].quality > minQuality) { + if (this.items[i].name != cheese && this.items[i].name != concertPass + && this.items[i].name != ragnaros && this.items[i].quality > minQuality) { this.items[i].quality -=1; } else { if (this.items[i].quality < maxQuality) { this.items[i].quality += 1; - if (this.items[i].name == pass) { + if (this.items[i].name == concertPass) { if (this.items[i].sellIn <= 10 && this.items[i].sellIn > 5) { // quality goes up by 2 when days are 10 or less if (this.items[i].quality < maxQuality) { @@ -51,16 +51,16 @@ export class GildedRose { } } // checking for legendary to subtract sell by date - if (this.items[i].name != hand) { + if (this.items[i].name != ragnaros) { this.items[i].sellIn -= 1; } if (this.items[i].sellIn < 0) { if (this.items[i].name != cheese) { - if (this.items[i].name != pass) { + if (this.items[i].name != concertPass) { if (this.items[i].quality > minQuality) { // move this if above line 57 if - if (this.items[i].name != hand) { + if (this.items[i].name != ragnaros) { this.items[i].quality -= 1; } }