|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object UserPigPlayer
public class UserPigPlayer
UserPigPlayer
- text interface to query user for roll/hold decisions
Constructor Summary | |
---|---|
UserPigPlayer()
Creates a new UserPigPlayer instance to allow user play via standard input
Output format: Print an instruction line "Enter nothing to roll; enter anything to hold." |
Method Summary | |
---|---|
boolean |
isRolling(int myScore,
int otherScore,
int turnTotal)
isRolling - return whether or not the player rolls, given the current game state. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UserPigPlayer()
UserPigPlayer
instance to allow user play via standard input
Method Detail |
---|
public boolean isRolling(int myScore, int otherScore, int turnTotal)
isRolling
- return whether or not the player rolls, given the current game state.
isRolling
in interface PigPlayer
myScore
- an int
value - the player's scoreotherScore
- an int
value - the opponent's scoreturnTotal
- an int
value - the player's current turn total
boolean
value - whether or not the player will continue to roll
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |