|
Blackjack | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
IHand defines the standard API for a hand of cards, including basic manipulation and score retrieval.
| Method Summary | |
void |
clear()
Removes this hand from the table and notifies the GUI listeners. |
int |
getBestTotal()
Returns the best score for this hand (the highest non-busting score). |
int |
getBestTotal(int cardIndex)
Returns the best score for this hand (the highest non-busting score), not including cards beyond the specified index. |
java.lang.String |
getCurrentScore(int cardIndex)
Returns a displayable current score (or "busted" if this hand has busted), not including cards beyond the specified index. |
int |
getHardTotal()
Returns the hard score for this hand (the sum of all card hard scores). |
int |
getSoftTotal()
Returns the soft score for this hand (the sum of all card soft scores). |
boolean |
hasBlackjack()
Indicates whether this hand has blackjack. |
boolean |
hasBusted()
Indicates whether this hand has busted. |
boolean |
hasPair()
Indicates whether this hand contains a pair of matching scores. |
boolean |
hasSoftTotal()
Indicates whether this hand has a soft total |
void |
hit()
Adds a card from the deck to this hand and begins its animation. |
| 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 java.lang.String getCurrentScore(int cardIndex)
cardIndex - the last card in this hand to include in the scorepublic boolean hasBusted()
public void hit()
public boolean hasBlackjack()
public int getBestTotal()
public int getBestTotal(int cardIndex)
cardIndex - the last card in this hand to include in the scorepublic void clear()
public boolean hasPair()
public int getSoftTotal()
public boolean hasSoftTotal()
public int getHardTotal()
|
Blackjack | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||