mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-21 09:21:08 +00:00
Extract method to update the item quality
This commit is contained in:
parent
b57ae7007d
commit
37f400d4b1
@ -7,6 +7,9 @@ class GildedRose(object):
|
|||||||
|
|
||||||
def update_quality(self):
|
def update_quality(self):
|
||||||
for item in self.items:
|
for item in self.items:
|
||||||
|
self.update_item_quality(item)
|
||||||
|
|
||||||
|
def update_item_quality(self, item):
|
||||||
if item.name != "Aged Brie" and item.name != "Backstage passes to a TAFKAL80ETC concert":
|
if item.name != "Aged Brie" 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":
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user