mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-18 16:01:42 +00:00
- Moved 'updateQuality' related code to another class (QualityUpdater); - Introduced 'Category' for an Item category, which specifies how an Item should update its quality; - Introduced 'StandardQualityDegrader' for Default Category and for 'Conjured' items which degrade twice as fast; - Completed tests.
16 lines
296 B
Java
16 lines
296 B
Java
package com.gildedrose;
|
|
|
|
class GildedRose {
|
|
Item[] items;
|
|
|
|
private final QualityUpdater qualityUpdater = new QualityUpdater();
|
|
|
|
public GildedRose(Item[] items) {
|
|
this.items = items;
|
|
}
|
|
|
|
public void updateQuality() {
|
|
qualityUpdater.updateQuality(items);
|
|
}
|
|
}
|