mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-09 03:31:28 +00:00
r rm dead code
This commit is contained in:
parent
984f5e61da
commit
fe50ef0945
@ -23,43 +23,25 @@ def update_item(item: Item):
|
|||||||
is_backstage_pass = item.name == "Backstage passes to a TAFKAL80ETC concert"
|
is_backstage_pass = item.name == "Backstage passes to a TAFKAL80ETC concert"
|
||||||
|
|
||||||
if is_backstage_pass:
|
if is_backstage_pass:
|
||||||
if not False and not True:
|
if item.quality < 50:
|
||||||
if item.quality > 0:
|
item.quality = item.quality + 1
|
||||||
if item.name != "Sulfuras, Hand of Ragnaros":
|
if item.sell_in < 11:
|
||||||
item.quality = item.quality - 1
|
if item.quality < 50:
|
||||||
else:
|
item.quality = item.quality + 1
|
||||||
if item.quality < 50:
|
if item.sell_in < 6:
|
||||||
item.quality = item.quality + 1
|
if item.quality < 50:
|
||||||
if item.sell_in < 11:
|
item.quality = item.quality + 1
|
||||||
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":
|
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 True:
|
item.quality = item.quality - item.quality
|
||||||
if item.quality > 0:
|
|
||||||
if item.name != "Sulfuras, Hand of Ragnaros":
|
|
||||||
item.quality = item.quality - 1
|
|
||||||
else:
|
|
||||||
item.quality = item.quality - item.quality
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if not False and not False:
|
if not False and not False:
|
||||||
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
|
||||||
else:
|
|
||||||
if item.quality < 50:
|
|
||||||
item.quality = item.quality + 1
|
|
||||||
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":
|
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:
|
||||||
@ -67,8 +49,6 @@ def update_item(item: Item):
|
|||||||
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
|
||||||
else:
|
|
||||||
item.quality = item.quality - item.quality
|
|
||||||
|
|
||||||
|
|
||||||
class GildedRose:
|
class GildedRose:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user