|
Blackjack | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.amoebacode.blackjack.strategy.BasicStrategyServer
BasicStrategyServer responds to SOAP RPC-based requests from the client and calculates proper basic strategy decisions.
| Field Summary | |
private HardStrategy |
hardStrategy
The matrix of correct strategy decisions for hard hands |
private IHouseRules |
houseRules
The set of casino options |
private PairStrategy |
pairStrategy
The matrix of correct strategy decisions for pair hands |
private SoftStrategy |
softStrategy
The matrix of correct strategy decisions for soft hands |
| Constructor Summary | |
BasicStrategyServer()
Default public constructor. |
|
| Method Summary | |
private void |
checkArguments(java.lang.String[] args)
Validates the set of arguments received from the SOAP client. |
private CorrectAction |
getCorrectAction(BasicStrategyHand bsh,
int dealerScore)
Returns the appropriate correct action object for the specified player hand and dealer score. |
java.lang.String |
getCorrectAction(java.lang.String[] args)
Responds to the SOAP RPC-based get correct action request by validating the arguments and returning the correct playing decision. |
private java.lang.String |
getCorrectActionDisplay(CorrectAction ca)
Returns the appropriate correct action display message for the specified correct action object. |
private void |
setStrategy()
Sets the various matrices of correct strategy decisions based on the selected casino options. |
private void |
updateOptions(java.lang.String arg)
Updates the casino options based on the specified argument sent from the SOAP client. |
private void |
updateOptions(java.lang.String[] args)
Updates the casino options based on the arguments sent from the SOAP client. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private IHouseRules houseRules
private PairStrategy pairStrategy
private HardStrategy hardStrategy
private SoftStrategy softStrategy
| Constructor Detail |
public BasicStrategyServer()
houseRules - the set of casino options| Method Detail |
public java.lang.String getCorrectAction(java.lang.String[] args)
args - the array of arguments from the SOAP clientprivate void setStrategy()
private void updateOptions(java.lang.String[] args)
args - the array of arguments from the SOAP clientprivate void updateOptions(java.lang.String arg)
args - the array of arguments from the SOAP clientprivate java.lang.String getCorrectActionDisplay(CorrectAction ca)
ca - the correct action object
private void checkArguments(java.lang.String[] args)
throws java.lang.IllegalArgumentException
args - the array of arguments from the SOAP clientthrows - an IllegalArgumentException if the arguments are invalid
private CorrectAction getCorrectAction(BasicStrategyHand bsh,
int dealerScore)
bsh - the player's handdealerScore - the score of the dealer's hand
|
Blackjack | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||