|
Blackjack | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
IPlayerHand defines the public API used to manage one player's hand.
| Method Summary | |
void |
buyInsurance()
Accepts the insurance offer. |
boolean |
canAct()
Indicates whether the player can act on this hand. |
boolean |
canDoubleDown()
Indicates whether the player can double down this hand. |
boolean |
canHit()
Indicates whether the player can hit this hand. |
boolean |
canSplit()
Indicates whether the player can split this hand. |
boolean |
canStand()
Indicates whether the player can stand on this hand. |
boolean |
canSurrender()
Indicates whether the player can accept surrender on this hand. |
void |
checkAction(java.lang.String action)
Checks whether the specified user action is the proper basic strategy play. |
void |
computeNetGain(int dealerScore)
Calculates the net gain for this hand based on the specified dealer score, the current bet, and the outcome. |
void |
declineInsurance()
Declines the insurance offer. |
void |
doubleBet()
Doubles the current bet and notifies the GUI listeners. |
int |
getBet()
Returns the amount of the current bet for this hand. |
int |
getHandIndex()
Returns the relative index of this hand within the player's collection of hands. |
double |
getNetGain()
Returns the user's net gain for this hand. |
boolean |
hasSurrendered()
Indicates whether the player has surrendered this hand. |
boolean |
offerInsurance()
Indicates whether the player should be offered insurance. |
void |
split()
Splits this hand's pair into two different hands. |
void |
stand()
Stands on this hand. |
void |
surrender()
Accepts surrender on this hand. |
void |
updateAvailableCommands()
Updates the set of available player hand commands for each GUI listener. |
| Methods inherited from interface com.amoebacode.blackjack.core.IHand |
clear, getBestTotal, getBestTotal, getCurrentScore, getHardTotal, getSoftTotal, hasBlackjack, hasBusted, hasPair, hasSoftTotal, hit |
| Methods inherited from interface com.amoebacode.blackjack.core.ICardCollection |
addCard, getCardAt, getNextCard, getNumberOfCards, setCards |
| Methods inherited from interface com.amoebacode.blackjack.core.IGameObject |
addEventListener, getGame, getParent |
| Method Detail |
public boolean canAct()
public boolean hasSurrendered()
public int getHandIndex()
public void computeNetGain(int dealerScore)
dealerScore - the score of the dealer handpublic int getBet()
public void doubleBet()
public void buyInsurance()
public void declineInsurance()
public void split()
public void stand()
public void surrender()
public void checkAction(java.lang.String action)
action - a String representing the decision chosenpublic boolean offerInsurance()
public boolean canHit()
public boolean canStand()
public boolean canDoubleDown()
public boolean canSplit()
public boolean canSurrender()
public void updateAvailableCommands()
public double getNetGain()
|
Blackjack | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||