|
Blackjack | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
IRound defines the public API for managing a round of blackjack, including access to the dealer hand and the player.
| Method Summary | |
boolean |
allPlayerHandsBlackjack()
Indicates whether all of the player hands have blackjack. |
boolean |
allPlayerHandsBustedOrSurrendered()
Indicates whether all of the player hands have busted or surrendered. |
void |
checkAction(IPlayerHand playerHand,
java.lang.String action)
Checks whether the specified user action is the proper basic strategy play. |
void |
clear()
Clears each of the round participants. |
void |
completeDealer()
Completes the dealer (called when the player is finished). |
boolean |
dealerHasBlackjack()
Indicates whether the dealer has blackjack. |
boolean |
firstDealerCardIsAce()
Indicates whether insurance should be offered to the user. |
double |
getPlayerNetGain()
Returns the net gain for the player hands. |
boolean |
playerFinished()
Indicates whether the player has finished all player hands. |
void |
setupParticipants()
Sets up the dealer and player participants and notifies the GUI listeners. |
void |
startRound(int initialBet)
Starts the round with the specified initial bet. |
void |
updateAvailableCommands()
Updates the set of available player hand commands for each GUI listener. |
| Methods inherited from interface com.amoebacode.blackjack.core.IGameObject |
addEventListener, getGame, getParent |
| Method Detail |
public boolean allPlayerHandsBustedOrSurrendered()
public boolean allPlayerHandsBlackjack()
public void clear()
public void startRound(int initialBet)
initialBet - the initial player betpublic boolean playerFinished()
public void completeDealer()
public boolean dealerHasBlackjack()
public boolean firstDealerCardIsAce()
public void updateAvailableCommands()
public void checkAction(IPlayerHand playerHand,
java.lang.String action)
playerHand - the IPlayerHand making the actionaction - a String representing the decision chosenpublic void setupParticipants()
public double getPlayerNetGain()
|
Blackjack | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||