/* RollDice class for rolling dice
 * Author: CPSC 111 Jan 2010 class
 * Date: Wed 27 Jan 2010
 *
 * Start of tester for Die2 class. 
 * We found that we do not need to import Die2 in order to have it used, since our CLASSPATH is set correctly.
 */

import java.util.Scanner;

public class RollDice
{
    public static void main ( String [] args)
    {
	Die2 myDie = new Die2();
	// testing that roll does the right thing even before we use setSides
	// this call is safe because Die constructor has a backstop value of 6
	int roll1 = myDie.roll();

	System.out.println("How many sides do you want?");
	// need a Scanner
	Scanner scanThing = new Scanner(System.in); 
	int a = scanThing.nextInt();
        // continuing on Wednesday with:

	// this call uses the value we asked the user to enter
	// testing that setSides does the right thing
	myDie.setSides(a);
	int roll2 = myDie.roll();
	System.out.println("first roll was " + roll1 +
			   " second roll was " + roll2);
    }
}

