mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-10 04:01:19 +00:00
r lift up condition
This commit is contained in:
parent
a5583e4129
commit
fac2855db6
@ -11,7 +11,8 @@ class Item:
|
|||||||
def update_item(item: Item):
|
def update_item(item: Item):
|
||||||
is_aged_brie = item.name == "Aged Brie"
|
is_aged_brie = item.name == "Aged Brie"
|
||||||
|
|
||||||
if not is_aged_brie and item.name != "Backstage passes to a TAFKAL80ETC concert":
|
if is_aged_brie:
|
||||||
|
if not True and item.name != "Backstage passes to a TAFKAL80ETC concert":
|
||||||
if item.quality > 0:
|
if item.quality > 0:
|
||||||
if item.name != "Sulfuras, Hand of Ragnaros":
|
if item.name != "Sulfuras, Hand of Ragnaros":
|
||||||
item.quality = item.quality - 1
|
item.quality = item.quality - 1
|
||||||
@ -28,7 +29,36 @@ def update_item(item: Item):
|
|||||||
if item.name != "Sulfuras, Hand of Ragnaros":
|
if item.name != "Sulfuras, Hand of Ragnaros":
|
||||||
item.sell_in = item.sell_in - 1
|
item.sell_in = item.sell_in - 1
|
||||||
if item.sell_in < 0:
|
if item.sell_in < 0:
|
||||||
if not is_aged_brie:
|
if not True:
|
||||||
|
if item.name != "Backstage passes to a TAFKAL80ETC concert":
|
||||||
|
if item.quality > 0:
|
||||||
|
if item.name != "Sulfuras, Hand of Ragnaros":
|
||||||
|
item.quality = item.quality - 1
|
||||||
|
else:
|
||||||
|
item.quality = item.quality - item.quality
|
||||||
|
else:
|
||||||
|
if item.quality < 50:
|
||||||
|
item.quality = item.quality + 1
|
||||||
|
|
||||||
|
else:
|
||||||
|
if not False and item.name != "Backstage passes to a TAFKAL80ETC concert":
|
||||||
|
if item.quality > 0:
|
||||||
|
if item.name != "Sulfuras, Hand of Ragnaros":
|
||||||
|
item.quality = item.quality - 1
|
||||||
|
else:
|
||||||
|
if item.quality < 50:
|
||||||
|
item.quality = item.quality + 1
|
||||||
|
if item.name == "Backstage passes to a TAFKAL80ETC concert":
|
||||||
|
if item.sell_in < 11:
|
||||||
|
if item.quality < 50:
|
||||||
|
item.quality = item.quality + 1
|
||||||
|
if item.sell_in < 6:
|
||||||
|
if item.quality < 50:
|
||||||
|
item.quality = item.quality + 1
|
||||||
|
if item.name != "Sulfuras, Hand of Ragnaros":
|
||||||
|
item.sell_in = item.sell_in - 1
|
||||||
|
if item.sell_in < 0:
|
||||||
|
if not False:
|
||||||
if item.name != "Backstage passes to a TAFKAL80ETC concert":
|
if item.name != "Backstage passes to a TAFKAL80ETC concert":
|
||||||
if item.quality > 0:
|
if item.quality > 0:
|
||||||
if item.name != "Sulfuras, Hand of Ragnaros":
|
if item.name != "Sulfuras, Hand of Ragnaros":
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user