mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-10 04:01:19 +00:00
r temp var -> to func
This commit is contained in:
parent
65d5bbf477
commit
dd6e3d35d2
@ -16,9 +16,11 @@ def is_sulfuras(item: Item) -> None:
|
|||||||
return item.name == "Sulfuras, Hand of Ragnaros"
|
return item.name == "Sulfuras, Hand of Ragnaros"
|
||||||
|
|
||||||
|
|
||||||
def update_item(item: Item):
|
def is_backstage_pass(item: Item) -> None:
|
||||||
is_backstage_pass = item.name == "Backstage passes to a TAFKAL80ETC concert"
|
return item.name == "Backstage passes to a TAFKAL80ETC concert"
|
||||||
|
|
||||||
|
|
||||||
|
def update_item(item: Item):
|
||||||
if is_sulfuras(item):
|
if is_sulfuras(item):
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -31,7 +33,7 @@ def update_item(item: Item):
|
|||||||
item.quality = item.quality + 1
|
item.quality = item.quality + 1
|
||||||
return
|
return
|
||||||
|
|
||||||
if is_backstage_pass:
|
if is_backstage_pass(item):
|
||||||
if item.quality < 50:
|
if item.quality < 50:
|
||||||
item.quality = item.quality + 1
|
item.quality = item.quality + 1
|
||||||
if item.sell_in < 11:
|
if item.sell_in < 11:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user