Class Player

java.lang.Object
  extended by Player

public class Player
extends java.lang.Object

This class is an implementation of a player object, for the stupid dice game


Constructor Summary
Player()
          Default constructor, creates a player and gives him his 2 dice
 
Method Summary
 int getTotal()
          get the sum of the two dice
 int rollDice()
          roll the two dice
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Player

public Player()
Default constructor, creates a player and gives him his 2 dice

Method Detail

rollDice

public int rollDice()
roll the two dice

Returns:
the sum of the 2 dice rolled

getTotal

public int getTotal()
get the sum of the two dice

Returns:
the sum of the 2 dice previously rolled