Skip to content

Commit

Permalink
Removed conditionals for backstage pass
Browse files Browse the repository at this point in the history
  • Loading branch information
jimweirich committed Feb 22, 2011
1 parent ad13ac9 commit 8a76662
Showing 1 changed file with 6 additions and 27 deletions.
33 changes: 6 additions & 27 deletions gilded_rose.rb
Expand Up @@ -72,37 +72,16 @@ def update_one(item)
return
end

if item.name != 'Backstage passes to a TAFKAL80ETC concert'
if item.quality > 0
item.quality -= 1
end
else
if item.quality < 50
item.quality += 1
if item.name == 'Backstage passes to a TAFKAL80ETC concert'
if item.sell_in < 11
if item.quality < 50
item.quality += 1
end
end
if item.sell_in < 6
if item.quality < 50
item.quality += 1
end
end
end
end
if item.quality > 0
item.quality -= 1
end

item.sell_in -= 1
if item.sell_in < 0
if item.name != 'Backstage passes to a TAFKAL80ETC concert'
if item.quality > 0
if item.name != 'Sulfuras, Hand of Ragnaros'
item.quality -= 1
end
if item.quality > 0
if item.name != 'Sulfuras, Hand of Ragnaros'
item.quality -= 1
end
else
item.quality = item.quality - item.quality
end
end
end
Expand Down

0 comments on commit 8a76662

Please sign in to comment.