Commit 13c57e5a by 李楚霏

task-7-adding-structure

parent ad3cf480
......@@ -42,6 +42,12 @@ export class Item {
}
_updateItem(item) {
this.updateQualityInOneDay(item);
this.updateSellInInOneDay(item);
this.updateQualityAfterDevaluation(item);
}
updateQualityInOneDay(item) {
if (item.name != this.isAgedBrie() && item.name != this.isBackStagePass()) {
if (item.quality > 0) {
if (item.name != this.isSulfuras()) {
......@@ -65,9 +71,15 @@ export class Item {
}
}
}
}
updateSellInInOneDay(item) {
if (item.name != this.isSulfuras()) {
this.decreaseSellIn(item)
}
}
updateQualityAfterDevaluation(item) {
if (item.sell_in < 0) {
if (item.name != this.isAgedBrie()) {
if (item.name != this.isBackStagePass()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment