mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-16 06:51:27 +00:00
2ndステップ踏み始め
This commit is contained in:
parent
25c22bad50
commit
5cbc4ac822
@ -39,19 +39,19 @@ class GildedRose
|
||||
item.sell_in = item.sell_in - 1
|
||||
end
|
||||
if item.sell_in < 0
|
||||
if item.name != AGED_BRIE
|
||||
if item.name != BACKSTAGE_PASS
|
||||
if item.name == AGED_BRIE
|
||||
if item.quality < 50
|
||||
increment_item_quality(item)
|
||||
end
|
||||
else
|
||||
if item.name == BACKSTAGE_PASS
|
||||
item.quality = 0
|
||||
else
|
||||
if item.quality > 0
|
||||
if item.name != SULFURAS
|
||||
item.quality = item.quality - 1
|
||||
end
|
||||
end
|
||||
else
|
||||
item.quality = item.quality - item.quality
|
||||
end
|
||||
else
|
||||
if item.quality < 50
|
||||
increment_item_quality(item)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user