Skip to content

Commit

Permalink
Merge branch 'master' into qualitycontrol
Browse files Browse the repository at this point in the history
  • Loading branch information
sandromancuso committed Jan 11, 2012
2 parents 43cffeb + 97a4026 commit 33331bf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main/java/org/gildedrose/GildedRose.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,16 @@
public class GildedRose {

private static List<Item> items = null;
private static QualityControl qualityControl;

public GildedRose(QualityControl qualityControl) {
GildedRose.qualityControl = qualityControl;
}

public void updateQualityFor(List<Item> items) {
GildedRose.updateQuality(items);
}

/**
* @param args
*/
Expand All @@ -28,6 +37,7 @@ public static void main(String[] args) {
public static void updateQuality(List<Item> items) {
for (Item item : items) {
udpateSellInFor(item);
qualityControl.updateQualityFor(item);
updateQualityFor(item);
}
}
Expand Down

0 comments on commit 33331bf

Please sign in to comment.