mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-07-27 01:31:23 +00:00
Pure file move + namespace alignment, no logic changes: - Interfaces/ IItemUpdater, IItemUpdaterFactory (GildedRoseKata.Interfaces) - Factories/ ItemUpdaterFactory incl. static Default() (GildedRoseKata.Factories) - Strategies/ ItemUpdaterBase + the 5 concrete updaters (GildedRoseKata.Strategies) GildedRose.cs changes only in usings; Item.cs and Program.cs untouched. Full suite 24/24 green; approval snapshot byte-identical. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
17 lines
382 B
C#
17 lines
382 B
C#
namespace GildedRoseKata.Strategies;
|
|
|
|
public class NormalItemUpdater : ItemUpdaterBase
|
|
{
|
|
public override string Name => "default";
|
|
|
|
public override void Update(Item item)
|
|
{
|
|
item.Quality = ClampQuality(item.Quality - 1);
|
|
item.SellIn -= 1;
|
|
if (item.SellIn < 0)
|
|
{
|
|
item.Quality = ClampQuality(item.Quality - 1);
|
|
}
|
|
}
|
|
}
|