mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-18 07:51:29 +00:00
update item quality
updating the ite.quality affectation
This commit is contained in:
parent
112db7306b
commit
1302ae4686
@ -13,23 +13,23 @@ class GildedRose {
|
|||||||
&& !item.name.equals("Backstage passes to a TAFKAL80ETC concert")) {
|
&& !item.name.equals("Backstage passes to a TAFKAL80ETC concert")) {
|
||||||
if (item.quality > 0) {
|
if (item.quality > 0) {
|
||||||
if (!item.name.equals("Sulfuras, Hand of Ragnaros")) {
|
if (!item.name.equals("Sulfuras, Hand of Ragnaros")) {
|
||||||
item.quality = item.quality - 1;
|
item.quality--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (item.quality < 50) {
|
if (item.quality < 50) {
|
||||||
item.quality = item.quality + 1;
|
item.quality++;
|
||||||
|
|
||||||
if (item.name.equals("Backstage passes to a TAFKAL80ETC concert")) {
|
if (item.name.equals("Backstage passes to a TAFKAL80ETC concert")) {
|
||||||
if (item.sellIn < 11) {
|
if (item.sellIn < 11) {
|
||||||
if (item.quality < 50) {
|
if (item.quality < 50) {
|
||||||
item.quality = item.quality + 1;
|
item.quality++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.sellIn < 6) {
|
if (item.sellIn < 6) {
|
||||||
if (item.quality < 50) {
|
if (item.quality < 50) {
|
||||||
item.quality = item.quality + 1;
|
item.quality++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -37,7 +37,7 @@ class GildedRose {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!item.name.equals("Sulfuras, Hand of Ragnaros")) {
|
if (!item.name.equals("Sulfuras, Hand of Ragnaros")) {
|
||||||
item.sellIn = item.sellIn - 1;
|
item.sellIn--;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.sellIn < 0) {
|
if (item.sellIn < 0) {
|
||||||
@ -45,15 +45,15 @@ class GildedRose {
|
|||||||
if (!item.name.equals("Backstage passes to a TAFKAL80ETC concert")) {
|
if (!item.name.equals("Backstage passes to a TAFKAL80ETC concert")) {
|
||||||
if (item.quality > 0) {
|
if (item.quality > 0) {
|
||||||
if (!item.name.equals("Sulfuras, Hand of Ragnaros")) {
|
if (!item.name.equals("Sulfuras, Hand of Ragnaros")) {
|
||||||
item.quality = item.quality - 1;
|
item.quality--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
item.quality = item.quality - item.quality;
|
item.quality = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (item.quality < 50) {
|
if (item.quality < 50) {
|
||||||
item.quality = item.quality + 1;
|
item.quality++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user