mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-04 09:11:39 +00:00
r guard clause
This commit is contained in:
parent
1ba4ae4fc4
commit
3c4653f45d
@ -41,13 +41,12 @@ def update_item(item: Item):
|
||||
if is_sulfuras:
|
||||
return
|
||||
|
||||
else:
|
||||
if item.quality > 0:
|
||||
item.quality = item.quality - 1
|
||||
item.sell_in = item.sell_in - 1
|
||||
if item.sell_in < 0:
|
||||
if item.quality > 0:
|
||||
item.quality = item.quality - 1
|
||||
item.sell_in = item.sell_in - 1
|
||||
if item.sell_in < 0:
|
||||
if item.quality > 0:
|
||||
item.quality = item.quality - 1
|
||||
|
||||
|
||||
class GildedRose:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user