mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-15 22:41:30 +00:00
changed part of method that changes backstage pass quality to zero to a more logical method
This commit is contained in:
parent
626eab9e10
commit
0ae0723f57
@ -13,6 +13,7 @@ class GildedRose
|
|||||||
end
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
if item.quality < 50
|
if item.quality < 50
|
||||||
item.quality = item.quality + 1
|
item.quality = item.quality + 1
|
||||||
if item.name.downcase.match /backstage/
|
if item.name.downcase.match /backstage/
|
||||||
@ -28,6 +29,7 @@ class GildedRose
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
if !sulfuras?(item)
|
if !sulfuras?(item)
|
||||||
item.sell_in = item.sell_in - 1
|
item.sell_in = item.sell_in - 1
|
||||||
@ -41,7 +43,7 @@ class GildedRose
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
item.quality = item.quality - item.quality
|
item.quality = 0
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if item.quality < 50
|
if item.quality < 50
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user