mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-04 09:11:39 +00:00
sellItem update
Remove checking inside func
This commit is contained in:
parent
ac51ee20e4
commit
1313648b66
@ -25,7 +25,7 @@ class GildedRose(var items: List<Item>) {
|
||||
}
|
||||
}
|
||||
|
||||
sellItem(i)
|
||||
if (items[i].name != "Sulfuras, Hand of Ragnaros") sellItem(i)
|
||||
}
|
||||
}
|
||||
|
||||
@ -59,7 +59,7 @@ class GildedRose(var items: List<Item>) {
|
||||
}
|
||||
|
||||
private fun sellItem(i: Int) {
|
||||
if (items[i].name != "Sulfuras, Hand of Ragnaros") items[i].sellIn -= 1
|
||||
items[i].sellIn -= 1
|
||||
}
|
||||
|
||||
private fun downGradeQuality(i: Int) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user