|
Blackjack | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
IGame defines the public API for managing the blackjack game, including access to the deck, round, house rules, basic strategy, and preferences.
| Method Summary | |
boolean |
canDeal()
Indicates whether the next round can be dealt. |
boolean |
canLowerBet()
Indicates whether the user can lower the initial bet. |
boolean |
canRaiseBet()
Indicates whether the user can raise the initial bet. |
void |
checkAction(IPlayerHand playerHand,
java.lang.String action,
int dealerScore)
Checks whether the specified user action is the proper basic strategy play based on the specified dealer score. |
void |
deal()
Clears the current round and starts the next one (called when the deal button is clicked). |
void |
executeCommand(ICommand command)
Executes the specified game command, updates the available commands, finishes the round (when necessary). |
void |
finishRound()
Displays the game buttons, updates the current balance, and lowers the initial bet (if necessary). |
double |
getCurrentBalance()
Returns the user's current balance. |
IDeck |
getDeck()
Returns the set of cards to be dealt. |
IHouseRules |
getHouseRules()
Returns the casino options manager. |
int |
getInitialBet()
Returns the user's initial bet for the current round. |
IRound |
getRound()
Returns the current round of play. |
void |
lowerBet()
Lowers the initial bet by the default bet interval. |
void |
raiseBet()
Raises the initial bet by the default bet interval. |
void |
saveOptions()
Saves the user-selected casino options. |
void |
shuffleDeck()
Shuffles the deck of cards to be dealt. |
void |
startGame()
Sets up the game, including the current round, the casino options, the user preferences, basic strategy, and the shoe. |
| Methods inherited from interface com.amoebacode.blackjack.core.IGameObject |
addEventListener, getGame, getParent |
| Method Detail |
public boolean canDeal()
public void deal()
public double getCurrentBalance()
public void saveOptions()
public int getInitialBet()
public IDeck getDeck()
public IRound getRound()
public IHouseRules getHouseRules()
public boolean canLowerBet()
public void lowerBet()
public boolean canRaiseBet()
public void raiseBet()
public void executeCommand(ICommand command)
command - public void finishRound()
public void shuffleDeck()
public void checkAction(IPlayerHand playerHand,
java.lang.String action,
int dealerScore)
playerHand - the IPlayerHand making the actionaction - a String representing the decision chosendealerScore - the current dealer scorepublic void startGame()
|
Blackjack | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||