mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-04 09:11:39 +00:00
r temp var -> to func
This commit is contained in:
parent
72d26ee93f
commit
16f94420fa
@ -8,15 +8,18 @@ class Item:
|
||||
return "%s, %s, %s" % (self.name, self.sell_in, self.quality)
|
||||
|
||||
|
||||
def is_aged_brie(item: Item) -> None:
|
||||
return item.name == "Aged Brie"
|
||||
|
||||
|
||||
def update_item(item: Item):
|
||||
is_aged_brie = item.name == "Aged Brie"
|
||||
is_sulfuras = item.name == "Sulfuras, Hand of Ragnaros"
|
||||
is_backstage_pass = item.name == "Backstage passes to a TAFKAL80ETC concert"
|
||||
|
||||
if is_sulfuras:
|
||||
return
|
||||
|
||||
if is_aged_brie:
|
||||
if is_aged_brie(item):
|
||||
if item.quality < 50:
|
||||
item.quality = item.quality + 1
|
||||
item.sell_in = item.sell_in - 1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user