Class PigGame

java.lang.Object
  extended by PigGame

public class PigGame
extends java.lang.Object

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

GOAL_SCORE

public static final int GOAL_SCORE
GOAL_SCORE - the goal score of Pig (usually 100).

See Also:
Constant Field Values
Constructor Detail

PigGame

public PigGame()
Creates a new PigGame instance with two UserPigPlayer instances.


PigGame

public PigGame(PigPlayer player1,
               PigPlayer player2)
Creates a new PigGame instance with the given first and second players.

Parameters:
player1 - a PigPlayer value - the first (starting) player
player2 - a PigPlayer value - the second player
Method Detail

play

public void play()
play - runs a game of Pig between the given players.
Output format: