mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-15 14:31:28 +00:00
21 lines
478 B
Java
21 lines
478 B
Java
package com.gildedrose;
|
|
|
|
import com.gildedrose.item.Item;
|
|
import com.gildedrose.item.CustomisedItemFactory;
|
|
|
|
class GildedRose {
|
|
|
|
private final CustomisedItemFactory itemFactory;
|
|
Item[] items;
|
|
|
|
public GildedRose(Item[] items) {
|
|
this.items = items;
|
|
this.itemFactory = new CustomisedItemFactory();
|
|
}
|
|
|
|
public void updateQuality() {
|
|
for (Item item : items) {
|
|
itemFactory.customiseItem(item).updateState(item);
|
|
}
|
|
}
|
|
} |