Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed GildedRose.pdf
Binary file not shown.
Binary file added GildedRose_rules.pdf
Binary file not shown.
Binary file modified bin/fi/oulu/tol/sqat/GildedRose.class
Binary file not shown.
Binary file modified bin/fi/oulu/tol/sqat/Item.class
Binary file not shown.
Binary file modified bin/fi/oulu/tol/sqat/tests/GildedRoseTest.class
Binary file not shown.
31 changes: 11 additions & 20 deletions src/fi/oulu/tol/sqat/GildedRose.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,18 @@ public class GildedRose {

private static List<Item> items = null;

/**
* @param args
*/
public static void main(String[] args) {

System.out.println("OMGHAI!");

items = new ArrayList<Item>();
items.add(new Item("+5 Dexterity Vest", 10, 20));
items.add(new Item("Aged Brie", 2, 0));
items.add(new Item("Elixir of the Mongoose", 5, 7));
items.add(new Item("Sulfuras, Hand of Ragnaros", 0, 80));
items.add(new Item("Backstage passes to a TAFKAL80ETC concert", 15, 20));
items.add(new Item("Conjured Mana Cake", 3, 6));

updateQuality();
}


public List<Item> getItems() {
return items;
}

public static void updateQuality()
public void addItem(Item item) {
items.add(item);
}

public GildedRose() {
items = new ArrayList<Item>();
}
public static void updateEndOfDay()
{
for (int i = 0; i < items.size(); i++)
{
Expand Down
6 changes: 3 additions & 3 deletions src/fi/oulu/tol/sqat/Item.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@


public class Item {
public String name;
public int sellIn;
public int quality;
String name;
int sellIn;
int quality;

public Item(String name, int sellIn, int quality) {
this.setName(name);
Expand Down
Loading