|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectDiceGame
public class DiceGame
Constructor Summary | |
---|---|
DiceGame(Player human,
Player cpu)
Constructs a new DiceGame between two given players. |
Method Summary | |
---|---|
boolean |
gameOver()
Returns true if the game is over. |
void |
playTurn()
Plays a single turn. |
void |
printInfo()
Prints information about the state of the game, as a string of one of the following forms: It is turn 0. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DiceGame(Player human, Player cpu)
human
- a Player representing the human playercpu
- a Player representing the computer playerMethod Detail |
---|
public void printInfo()
public void playTurn()
public boolean gameOver()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |