|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object PigGame
public class PigGame
PigGame
here - play a game of Pig with the given players
Output format:
Field Summary | |
---|---|
static int |
GOAL_SCORE
GOAL_SCORE - the goal score of Pig (usually 100). |
Constructor Summary | |
---|---|
PigGame()
Creates a new PigGame instance with two UserPigPlayer instances. |
|
PigGame(PigPlayer player1,
PigPlayer player2)
Creates a new PigGame instance with the given first and second players. |
Method Summary | |
---|---|
void |
play()
play - runs a game of Pig between the given players. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int GOAL_SCORE
GOAL_SCORE
- the goal score of Pig (usually 100).
Constructor Detail |
---|
public PigGame()
PigGame
instance with two UserPigPlayer
instances.
public PigGame(PigPlayer player1, PigPlayer player2)
PigGame
instance with the given first and second players.
player1
- a PigPlayer
value - the first (starting) playerplayer2
- a PigPlayer
value - the second playerMethod Detail |
---|
public void play()
play
- runs a game of Pig between the given players.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |