mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-08 03:01:24 +00:00
23 lines
437 B
C#
23 lines
437 B
C#
using System.Collections.Generic;
|
||
|
||
namespace GildedRoseKata;
|
||
|
||
public class GildedRose
|
||
{
|
||
private readonly IList<Item> Items;
|
||
|
||
public GildedRose(IList<Item> Items)
|
||
{
|
||
this.Items = Items;
|
||
}
|
||
|
||
public void UpdateQuality()
|
||
{
|
||
foreach (var item in Items)
|
||
{
|
||
var strategy = UpdateStrategyFactory.CreateStrategy(item.Name);
|
||
strategy.UpdateQuality(item);
|
||
}
|
||
}
|
||
}
|