|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PlayerObserver
An interface that allows observation of a player.
Method Summary | |
---|---|
void |
playerBets(int bet_amount,
int bankroll)
This method is invoked when the player makes a bet. |
void |
playerBlackjack(PlayerHand player_hand,
int amount_won,
int new_bankroll)
This method is invoked when the observed player gets a blackjack. |
void |
playerBusts(PlayerHand player_hand,
int amount_lost,
int new_bankroll)
This method is invoked when the player busts. |
void |
playerDealt(PlayerHand player_hand)
This method is invoked when the player is dealt a new hand. |
void |
playerDoublesDown(Card dealt_card,
PlayerHand new_hand)
This method is invoked when the player doubles down and is drawn a final card. |
void |
playerDraws(Card dealt_card,
PlayerHand new_hand)
This method is invoked when the player hits and is drawn a new card. |
void |
playerInsures(int bet_amount,
int bankroll)
This method is invoked when the player makes his insurance bet. |
void |
playerJoins(Table t)
This method is invoked when the player joins a table. |
void |
playerLeaves(Table t)
This method is invoked when the player leaves the table it had previously joined. |
void |
playerLoses(PlayerHand player_hand,
int amount_lost,
int new_bankroll)
This method is invoked when the observed player loses. |
void |
playerLosesInsurance(int amount_lost,
int new_bankroll)
This method is invoked when the observed player loses his insurance bet. |
void |
playerPush(PlayerHand player_hand,
int held_bankroll)
This method is invoked when the observed player ties the dealer, or pushes. |
void |
playerSplits(PlayerHand player_hand)
This method is invoked when the player splits the hand. |
void |
playerStands(PlayerHand player_hand)
This method is invoked when the player stands. |
void |
playerWins(PlayerHand player_hand,
int amount_won,
int new_bankroll)
This method is invoked when the observed player wins, but does not get blackjack. |
void |
playerWinsInsurance(int amount_won,
int new_bankroll)
This method is invoked when the observed player wins his insurance bet. |
Method Detail |
---|
void playerJoins(Table t)
t
- the table the player has joinedvoid playerLeaves(Table t)
t
- the table the player has leftvoid playerBets(int bet_amount, int bankroll)
bet_amount
- the amount the player betbankroll
- the bankroll of the player, which includes the amount betvoid playerInsures(int bet_amount, int bankroll)
bet_amount
- the amount the player insuresbankroll
- the bankroll of the player, which includes the amount betvoid playerDealt(PlayerHand player_hand)
player_hand
- the hand dealt to the playervoid playerDraws(Card dealt_card, PlayerHand new_hand)
dealt_card
- the new card the player drawsnew_hand
- the player hand including the drawn cardvoid playerStands(PlayerHand player_hand)
player_hand
- the player hand stood withvoid playerBusts(PlayerHand player_hand, int amount_lost, int new_bankroll)
player_hand
- the player hand busted withamount_lost
- the amount the player lostnew_bankroll
- the new bankroll of the player, after subtracting the lossvoid playerSplits(PlayerHand player_hand)
player_hand
- the player hand that was splitvoid playerDoublesDown(Card dealt_card, PlayerHand new_hand)
dealt_card
- the final card the player drawsnew_hand
- the player hand including the drawn cardvoid playerWins(PlayerHand player_hand, int amount_won, int new_bankroll)
player_hand
- the hand the player won onamount_won
- the amount the player wonnew_bankroll
- the new bankroll of the player, after adding the winningvoid playerLoses(PlayerHand player_hand, int amount_lost, int new_bankroll)
player_hand
- the hand the player lost onamount_lost
- the amount the player lostnew_bankroll
- the new bankroll of the player, after subtracting the lossvoid playerBlackjack(PlayerHand player_hand, int amount_won, int new_bankroll)
player_hand
- the hand the player received blackjack onamount_won
- the amount the player won on blackjacknew_bankroll
- the new bankroll of the player, after adding the winningvoid playerPush(PlayerHand player_hand, int held_bankroll)
player_hand
- the hand the player pushed onheld_bankroll
- the unchanged bankroll of the playervoid playerWinsInsurance(int amount_won, int new_bankroll)
amount_won
- the amount the player wonnew_bankroll
- the new bankroll of the player, after adding the winningvoid playerLosesInsurance(int amount_lost, int new_bankroll)
amount_lost
- the amount the player lostnew_bankroll
- the new bankroll of the player, after subtracting the loss
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |