Merge pull request #532 from jonreid/master

swift: use && instead of , for beginners and for automated mutation
This commit is contained in:
Peter Kofler 2024-03-19 09:05:28 +01:00 committed by GitHub
commit f42247354b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7,7 +7,7 @@ public class GildedRose {
public func updateQuality() { public func updateQuality() {
for i in 0 ..< items.count { for i in 0 ..< items.count {
if items[i].name != "Aged Brie", items[i].name != "Backstage passes to a TAFKAL80ETC concert" { if items[i].name != "Aged Brie" && items[i].name != "Backstage passes to a TAFKAL80ETC concert" {
if items[i].quality > 0 { if items[i].quality > 0 {
if items[i].name != "Sulfuras, Hand of Ragnaros" { if items[i].name != "Sulfuras, Hand of Ragnaros" {
items[i].quality = items[i].quality - 1 items[i].quality = items[i].quality - 1