mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-15 06:21:29 +00:00
moved specific sulfuras logic
This commit is contained in:
parent
2889f161ae
commit
783a62bb3f
@ -40,3 +40,4 @@
|
||||
-[x] encapsulate methods
|
||||
-[ ] isolate specific logics
|
||||
-[x] move specific logic to backstage
|
||||
-[x] move specific logic of sulfuras
|
||||
|
||||
@ -24,12 +24,12 @@ class GildedRose {
|
||||
}else if (item.name.equals(Backstage.BACKSTAGE)){
|
||||
updateBackstageQuality(item);
|
||||
}
|
||||
else{
|
||||
|
||||
else if (!item.name.equals(Sulfuras.SULFURAS)){
|
||||
if (!item.name.equals(Backstage.BACKSTAGE)) {
|
||||
if (item.quality > 0 && !item.name.equals(Sulfuras.SULFURAS)) {
|
||||
item.decreaseQuality();
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
if (item.quality < 50) {
|
||||
item.increaseQuality();
|
||||
@ -46,8 +46,6 @@ class GildedRose {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user