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>
18 lines
406 B
C#
18 lines
406 B
C#
using System;
|
|
|
|
using GildedRoseKata.Interfaces;
|
|
|
|
namespace GildedRoseKata.Strategies;
|
|
|
|
public abstract class ItemUpdaterBase : IItemUpdater
|
|
{
|
|
public const int MinQuality = 0;
|
|
public const int MaxQuality = 50;
|
|
|
|
public abstract string Name { get; }
|
|
|
|
public abstract void Update(Item item);
|
|
|
|
protected static int ClampQuality(int quality) => Math.Clamp(quality, MinQuality, MaxQuality);
|
|
}
|