mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-07-26 09:11:26 +00:00
Introduce the Strategy + Factory design: IItemUpdater (Name + Update), an ItemUpdaterBase with the single shared [0,50] clamp helper, stateless strategies for normal/Aged Brie/Sulfuras/Backstage, and a factory with two-tier resolution (exact name via case-insensitive dictionary, then Conjured prefix rule, then the default fallback). Not wired into GildedRose yet; no behaviour change. The Conjured strategy itself arrives in the feature commit. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
11 lines
306 B
C#
11 lines
306 B
C#
namespace GildedRoseKata;
|
|
|
|
public interface IItemUpdater
|
|
{
|
|
/// <summary>The exact item name this strategy handles ("default" for the fallback).</summary>
|
|
string Name { get; }
|
|
|
|
/// <summary>Applies one full day: quality change + SellIn change + clamping.</summary>
|
|
void Update(Item item);
|
|
}
|