|
Blackjack | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
IPlayer definies public API for a player, including access to the hands, initial bet, and net gain.
| Field Summary | |
static int |
MAXIMUM_NUMBER_OF_HANDS
The maximum number of hands that can be played |
| Method Summary | |
boolean |
allHandsBustedOrSurrendered()
Indicates whether all of the player hands have busted or surrendered. |
boolean |
allHandsFinished()
Indicates whether all of the player hands have finished. |
void |
computeNetGain(int dealerScore)
Computes the total net gain for all of the player hands, based on the specified dealer score and notifies the GUI listeners. |
double |
getNetGain()
Returns the user's net gain for the current round. |
boolean |
hasMaximumNumberOfHands()
Indicates whether the user is playing the maximum number of hands. |
void |
setInitialBet(int initialBet)
Sets the initial bet for the current round. |
void |
split(IPlayerHand playerHand)
Splits the specified hand into two hands (as long as the player has less than the maximum number of hands). |
void |
updateAvailableCommands()
Updates the set of available player hand commands for each GUI listener. |
| Methods inherited from interface com.amoebacode.blackjack.core.IParticipant |
allHandsBlackjack, clear, getFirstHand, getNumberOfHands, setupFirstHand |
| Methods inherited from interface com.amoebacode.blackjack.core.IGameObject |
addEventListener, getGame, getParent |
| Field Detail |
public static final int MAXIMUM_NUMBER_OF_HANDS
| Method Detail |
public double getNetGain()
public boolean allHandsFinished()
public void updateAvailableCommands()
public boolean allHandsBustedOrSurrendered()
public void setInitialBet(int initialBet)
initialBet - the player's initial bet for the current roundpublic void computeNetGain(int dealerScore)
dealerScore - the dealer scorepublic boolean hasMaximumNumberOfHands()
public void split(IPlayerHand playerHand)
hand - the IPlayerHand to split
|
Blackjack | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||