mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-04 09:11:39 +00:00
r extract var
This commit is contained in:
parent
e28a5033a2
commit
9450158cc8
@ -36,15 +36,17 @@ def update_item(item: Item):
|
||||
item.quality = item.quality - item.quality
|
||||
|
||||
else:
|
||||
is_sulfuras = item.name == "Sulfuras, Hand of Ragnaros"
|
||||
|
||||
if item.quality > 0:
|
||||
if item.name != "Sulfuras, Hand of Ragnaros":
|
||||
if not is_sulfuras:
|
||||
item.quality = item.quality - 1
|
||||
|
||||
if item.name != "Sulfuras, Hand of Ragnaros":
|
||||
if not is_sulfuras:
|
||||
item.sell_in = item.sell_in - 1
|
||||
if item.sell_in < 0:
|
||||
if item.quality > 0:
|
||||
if item.name != "Sulfuras, Hand of Ragnaros":
|
||||
if not is_sulfuras:
|
||||
item.quality = item.quality - 1
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user