Interface PigPlayer

All Known Implementing Classes:
HoldAt20PigPlayer, UserPigPlayer

public interface PigPlayer

interface PigPlayer provides a minimal interface between the PigGame and various PigPlayer classes. The player need only return a roll/hold decision given the current game state.


Method Summary
 boolean isRolling(int myScore, int otherScore, int turnTotal)
          isRolling - return whether or not the player rolls, given the current game state.
 

Method Detail

isRolling

boolean isRolling(int myScore,
                  int otherScore,
                  int turnTotal)
isRolling - return whether or not the player rolls, given the current game state.

Parameters:
myScore - an int value - the player's score
otherScore - an int value - the opponent's score
turnTotal - an int value - the player's current turn total
Returns:
a boolean value - whether or not the player will continue to roll