|
Blackjack | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.amoebacode.blackjack.strategy.BasicStrategyHand
BasicStrategyFactory calculates the proper strategy tables, depending on the current house rules.
| Field Summary | |
private int[] |
hardValues
The array of hard card values in this hand |
private int[] |
softValues
The array of soft card values in this hand |
| Constructor Summary | |
protected |
BasicStrategyHand(java.lang.String cards)
Default protected constructor. |
| Method Summary | |
protected int |
getBestTotal()
Returns the best score for this hand (the highest non-busting score). |
protected int |
getHardTotal()
Returns the hard score for this hand (the sum of all card hard scores). |
private int |
getMaximumSafeHitScore()
Returns the maximum hard score that can be safely hit. |
protected int |
getSoftTotal()
Returns the soft score for this hand (the sum of all card soft scores). |
protected boolean |
hasBlackjack()
Indicates whether this hand has Blackjack. |
protected boolean |
hasBusted()
Indicates whether this hand has busted. |
protected boolean |
hasPair()
Indicates whether this hand is a pair. |
protected boolean |
hasSoftTotal()
Indicates whether this hand has a soft total. |
private boolean |
shouldUseMixedTotal()
Indicates whether the optimal score involves mixing soft and hard scores. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private int[] softValues
private int[] hardValues
| Constructor Detail |
protected BasicStrategyHand(java.lang.String cards)
cards - a String representing the cards in the hand| Method Detail |
protected boolean hasPair()
protected boolean hasSoftTotal()
private int getMaximumSafeHitScore()
protected int getSoftTotal()
protected int getHardTotal()
protected int getBestTotal()
private boolean shouldUseMixedTotal()
protected boolean hasBusted()
protected boolean hasBlackjack()
|
Blackjack | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||