import java.util.ArrayList;
import java.util.*;  
/**
 * This models a videogame shop. This class represents an NPC running it.
 * The currency used are emeralds and each item as a value of emeralds. Emeralds are always in whole numbers!
 * Prices and their value:
 * Dirt = 2
 * Cobblestone = 5
 * Wood = 5
 * Iron Ore = 30
 * Diamond = 200
 * 
 * This class is mainly used for the Extension. You should also comment the methods/functions appropriately with for remove and add.
 */
public class Shop
{
    //Remember these are fields/global variables. Every function in this can reference this list.
    private ArrayList<Item> stock;
    
    /**
     * Constructor for objects of class Shop. We initialize the shop by creating Item objects and adding it to the array.
     */
    public Shop()
    {
        stock = new ArrayList<Item>();
        Item temp;
        int count = 0;
        while(count!=5){
            //
            temp = new Item("Dirt",2);
            stock.add(temp);
            count++;
        }
        count = 0;
        while(count!=5){
            //
            temp = new Item("Cobblestone",5);
            stock.add(temp);
            count++;
        }
        count = 0;
        while(count!=5){
            //
            temp = new Item("Wood",5);
            stock.add(temp);
            count++;
        }
        count = 0;
        while(count!=2){
            //
            temp = new Item("Iron Ore",30);
            stock.add(temp);
            count++;
        }
        System.out.println(stock);
    }
    
    
    
    /**
     * Method addItem
     *
     * @param name A parameter
     */
    public void addItem(String name){
        //YOUR CODE HERE
        
    }
    
    
    
    /**
     * Method removeItem
     *
     * @param name A parameter
     * @return The return value
     */
    public Item removeItem(String name){
        //YOUR CODE HERE
        return null;
    }
    
    /**
     * Prints out the total value of the stock.
     * Print out the contents of the shop.
     * Challenge: Print out the shop in a nicer way. Such 4xCobblestone, 2xWood etc, rather than just printing out the entire collection.
     */
    public void stockSummary(){
        //YOUR CODE HERE
    }

}
