/****************************************************************************
  Main Class:       Marktzee.java
  Author:           Mark Rich, richm@cs.wisc.edu
  Completion Date:  2/4/2000

  Course:           CS 302, Spring 2000, Lecture 8 & 29
  TA:               Me
  Assignment:       Sample Game

  Compiler:         CodeWarrior (JDK 1.2)
  Platform:         Windows NT 4.0
******************************************************************************/

import java.io.*;

/**
 * Marktzee is a wildly fun game involving three Die objects.  They are
 * each created with a different number of sides and rolled to bring up
 * a random number on top.  These values are totaled and returned to the
 * user.  Any number you get, you win!
 **/
class Marktzee {

    /**
     * main starts off the Marktzee game
     * @param args used for outside paramaters (none used in this program)
     **/
    public static void main (String[] args) {

	// Declare an integer to keep track of the sum for the game
	int sum = 0;

	// Declare and create three new Die
	Die fred = new Die(20);
	Die jimmy = new Die(6);
	Die betty = new Die(4);

	// Roll each die and accumulate their value in sum
	fred.roll();
	sum = sum + fred.getTop();

	jimmy.roll();
	sum = sum + jimmy.getTop();

	betty.roll();
	sum = sum + betty.getTop();

	// Display the sum to the screen.  Hooray!  You win!
	System.out.println(sum);
    }
}


