mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-14 22:21:20 +00:00
Revert previous changes to csharp project
Since I'm working on csharpcore
This commit is contained in:
parent
a69f02d975
commit
c657256ed9
@ -12,82 +12,78 @@ namespace csharp
|
||||
|
||||
public void UpdateQuality()
|
||||
{
|
||||
Items.ForEach(item => DailyItemUpdate(item));
|
||||
}
|
||||
|
||||
private void DailyItemUpdate(Item item)
|
||||
{
|
||||
if (item.Name != "Aged Brie" && item.Name != "Backstage passes to a TAFKAL80ETC concert")
|
||||
for (var i = 0; i < Items.Count; i++)
|
||||
{
|
||||
if (item.Quality > 0)
|
||||
if (Items[i].Name != "Aged Brie" && Items[i].Name != "Backstage passes to a TAFKAL80ETC concert")
|
||||
{
|
||||
if (item.Name != "Sulfuras, Hand of Ragnaros")
|
||||
if (Items[i].Quality > 0)
|
||||
{
|
||||
item.Quality = item.Quality - 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (item.Quality < 50)
|
||||
{
|
||||
item.Quality = item.Quality + 1;
|
||||
|
||||
if (item.Name == "Backstage passes to a TAFKAL80ETC concert")
|
||||
{
|
||||
if (item.SellIn < 11)
|
||||
if (Items[i].Name != "Sulfuras, Hand of Ragnaros")
|
||||
{
|
||||
if (item.Quality < 50)
|
||||
{
|
||||
item.Quality = item.Quality + 1;
|
||||
}
|
||||
Items[i].Quality = Items[i].Quality - 1;
|
||||
}
|
||||
|
||||
if (item.SellIn < 6)
|
||||
{
|
||||
if (item.Quality < 50)
|
||||
{
|
||||
item.Quality = item.Quality + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (item.Name != "Sulfuras, Hand of Ragnaros")
|
||||
{
|
||||
item.SellIn = item.SellIn - 1;
|
||||
}
|
||||
|
||||
if (item.SellIn < 0)
|
||||
{
|
||||
if (item.Name != "Aged Brie")
|
||||
{
|
||||
if (item.Name != "Backstage passes to a TAFKAL80ETC concert")
|
||||
{
|
||||
if (item.Quality > 0)
|
||||
{
|
||||
if (item.Name != "Sulfuras, Hand of Ragnaros")
|
||||
{
|
||||
item.Quality = item.Quality - 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
item.Quality = item.Quality - item.Quality;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (item.Quality < 50)
|
||||
if (Items[i].Quality < 50)
|
||||
{
|
||||
item.Quality = item.Quality + 1;
|
||||
Items[i].Quality = Items[i].Quality + 1;
|
||||
|
||||
if (Items[i].Name == "Backstage passes to a TAFKAL80ETC concert")
|
||||
{
|
||||
if (Items[i].SellIn < 11)
|
||||
{
|
||||
if (Items[i].Quality < 50)
|
||||
{
|
||||
Items[i].Quality = Items[i].Quality + 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (Items[i].SellIn < 6)
|
||||
{
|
||||
if (Items[i].Quality < 50)
|
||||
{
|
||||
Items[i].Quality = Items[i].Quality + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Items[i].Name != "Sulfuras, Hand of Ragnaros")
|
||||
{
|
||||
Items[i].SellIn = Items[i].SellIn - 1;
|
||||
}
|
||||
|
||||
if (Items[i].SellIn < 0)
|
||||
{
|
||||
if (Items[i].Name != "Aged Brie")
|
||||
{
|
||||
if (Items[i].Name != "Backstage passes to a TAFKAL80ETC concert")
|
||||
{
|
||||
if (Items[i].Quality > 0)
|
||||
{
|
||||
if (Items[i].Name != "Sulfuras, Hand of Ragnaros")
|
||||
{
|
||||
Items[i].Quality = Items[i].Quality - 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Items[i].Quality = Items[i].Quality - Items[i].Quality;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Items[i].Quality < 50)
|
||||
{
|
||||
Items[i].Quality = Items[i].Quality + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user