mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-18 16:01:42 +00:00
Simply expressions
This commit is contained in:
parent
2cd5a72201
commit
87617c7f25
@ -58,18 +58,18 @@ export class GildedRose {
|
|||||||
|
|
||||||
if (item.name == 'Aged Brie') {
|
if (item.name == 'Aged Brie') {
|
||||||
if (item.quality < 50) {
|
if (item.quality < 50) {
|
||||||
item.quality = item.quality + 1;
|
item.quality++
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.name == 'Backstage passes to a TAFKAL80ETC concert') {
|
if (item.name == 'Backstage passes to a TAFKAL80ETC concert') {
|
||||||
item.quality = item.quality - item.quality;
|
item.quality = 0
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.quality > 0) {
|
if (item.quality > 0) {
|
||||||
item.quality = item.quality - 1;
|
item.quality--
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user