mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-16 06:51:27 +00:00
Fully working refactor (all tests pass).
This commit is contained in:
parent
faa4859dc5
commit
326f0e5145
@ -7,6 +7,7 @@ class GildedRose(object):
|
||||
|
||||
def update_quality(self):
|
||||
for item in self.items:
|
||||
|
||||
# Set default parameters
|
||||
sell_in_rate = 1
|
||||
quality_rate = 1
|
||||
@ -47,10 +48,6 @@ class GildedRose(object):
|
||||
else:
|
||||
quality_sign = 1
|
||||
|
||||
elif item.name == "Conjured Mana Cake":
|
||||
if item.sell_in < 0:
|
||||
quality_rate = 2
|
||||
|
||||
item.sell_in -= sell_in_rate
|
||||
item.quality += (quality_sign*quality_rate)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user