import java.util.ArrayList;
import java.util.*;  
/**
 * This represents the player. He can buy the following items:
 * Dirt = 2
 * Cobblestone = 5
 * Wood = 5
 * Iron Ore = 30
 * Diamond = 200
 * 
 * Task:
 * Allow the user to add items to the basket to buy. When he has finished the order, print out the summary of his order(how many of each things) and the total cost.
 * Include a way to undo the last item 
 * Include a way to empty your basket and restart
 * You may assume the stock as no limit, but you should at least make sure you have enough money.
 * You should use the functions to help you do this, be careful, this functions do not belong to the shop!
 * 
 * Extension:
 * Now take into account of the stock limit for each item in the shop. You should do this when you try to add an item that is out of stock.
 * It will also be useful to update the shop stock after adding things to your basket, so print them out too.
 * The undo and reset commands should still be functional when the stock of the shop is considered. Ensure they still work.
 *
 *Challenge:
 *Generate the stock from a file
 *Adapt userinput to allow purchase of multiple items at a time. So "Diamond 30" will mean a purchase of 30 Diamond items.
 *You may need additional functions to make this doable, especially when taking into account stock, money etc.
 */
public class Shopper
{
    private Shop store;
    private int emeralds;
    private Stack<Item> basket;

    /**
     * Run this method to use the store.
     * You should list the options and ask the user what they would want to do
     *
     */
    public void run()
    {
        store = new Shop();
        basket = new Stack<Item>();
        emeralds = 500;//starting money for the player. You can change this if you want.
        System.out.println("Welcome to the shop!");
        System.out.println("You can add items to the order, finish your order, undo the last item, view your current order or quit.");
        Scanner scan = new Scanner(System.in);
        String input = scan.nextLine();
        //YOUR CODE HERE
    }
    
    /**
     * Create an Item based on the name.
     * After the item is created, add it to the basket.
     *
     * @param itemName A parameter
     */
    public void addToBasket(String itemName){
        //YOUR CODE HERE
        
    }
    
    /**
     * Print out the final order, the total cost, and how much money the player has left.
     *
     */
    public void finishOrder(){
        //YORUR CODE HERE
    }
    
    /**
     * Method viewBasket
     *
     */
    public void viewBasket(){
        //YOUR CODE HERE
    }
    
    /**
     * Method undoBasket
     *
     */
    public void undoBasket(){
        //YOUR CODE HERE
    }
}
