|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object blackjackanalyst.observer.AbstractTableObserver
public abstract class AbstractTableObserver
An abstract class that defines an empty body for each method of interface
TableObserver
. Concrete implementations that are only
interested in select methods of the interface can extend this class for
clarity and convenience.
Constructor Summary | |
---|---|
AbstractTableObserver()
|
Method Summary | |
---|---|
void |
dealerBlackjack(Hand dealer_hand)
This method is invoked when the dealer reveals its down card and receives a blackjack. |
void |
dealerBusts(Hand dealer_hand)
This method is invoked when the dealer busts. |
void |
dealerDealt(Card up_card)
This method is invoked when the dealer is dealt its up card. |
void |
dealerDealt(Card down_card,
Hand dealer_hand)
This method is invoked when the dealer reveals its down card and does not receive a blackjack. |
void |
dealerDraws(Card dealt_card,
Hand new_hand)
This method is invoked when the dealer hits and is drawn a new card. |
void |
dealerStands(Hand dealer_hand)
This method is invoked when the dealer stands. |
void |
newRound(java.util.List<Player> players)
This method is invoked before each new round of blackjack. |
void |
playerBets(Player betting_player,
int bet_amount,
int bankroll)
This method is invoked when a player makes a bet. |
void |
playerBlackjack(Player dealt_player,
PlayerHand player_hand,
int amount_won,
int new_bankroll)
This method is invoked when a player gets a blackjack. |
void |
playerBusts(Player dealt_player,
PlayerHand player_hand,
int amount_lost,
int new_bankroll)
This method is invoked when a player busts. |
void |
playerDealt(Player dealt_player,
PlayerHand player_hand)
This method is invoked when a player is dealt a new hand. |
void |
playerDoublesDown(Player dealt_player,
Card dealt_card,
PlayerHand new_hand)
This method is invoked when a player doubles down and is drawn a final card. |
void |
playerDraws(Player dealt_player,
Card dealt_card,
PlayerHand new_hand)
This method is invoked when a player hits and is drawn a new card. |
void |
playerInsures(Player betting_player,
int bet_amount,
int new_bankroll)
This method is invoked when a player makes his insurance bet. |
void |
playerJoins(Player joined_player)
This method is invoked when a player joins a table. |
void |
playerLeaves(Player left_player)
This method is invoked when a player leaves the table. |
void |
playerLoses(Player dealt_player,
PlayerHand player_hand,
int amount_lost,
int new_bankroll)
This method is invoked when a player loses. |
void |
playerLosesInsurance(Player dealt_player,
int amount_lost,
int new_bankroll)
This method is invoked when a player loses his insurance bet. |
void |
playerPush(Player dealt_player,
PlayerHand player_hand,
int held_bankroll)
This method is invoked when a player ties the dealer, or pushes. |
void |
playerSplits(Player dealt_player,
PlayerHand player_hand)
This method is invoked when a player splits the hand. |
void |
playerStands(Player dealt_player,
PlayerHand player_hand)
This method is invoked when a player stands. |
void |
playerWins(Player dealt_player,
PlayerHand player_hand,
int amount_won,
int new_bankroll)
This method is invoked when a player wins, but does not get blackjack. |
void |
playerWinsInsurance(Player dealt_player,
int amount_won,
int new_bankroll)
This method is invoked when a player wins his insurance bet. |
void |
shoeShuffled()
This method is invoked when the shoe is shuffled. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractTableObserver()
Method Detail |
---|
public void newRound(java.util.List<Player> players)
TableObserver
newRound
in interface TableObserver
players
- the players playing this roundpublic void shoeShuffled()
TableObserver
shoeShuffled
in interface TableObserver
public void dealerDealt(Card up_card)
TableObserver
dealerDealt
in interface TableObserver
up_card
- the up card of the dealerpublic void dealerDealt(Card down_card, Hand dealer_hand)
TableObserver
dealerDealt
in interface TableObserver
down_card
- the revealed down card of the dealerdealer_hand
- the dealer hand, including both its up and down cardpublic void dealerBlackjack(Hand dealer_hand)
TableObserver
dealerBlackjack
in interface TableObserver
dealer_hand
- the dealer hand that is a blackjackpublic void dealerDraws(Card dealt_card, Hand new_hand)
TableObserver
dealerDraws
in interface TableObserver
dealt_card
- the new card the dealer drawsnew_hand
- the dealer hand including its drawn cardpublic void dealerStands(Hand dealer_hand)
TableObserver
dealerStands
in interface TableObserver
dealer_hand
- the hand the dealer stood withpublic void dealerBusts(Hand dealer_hand)
TableObserver
dealerBusts
in interface TableObserver
dealer_hand
- the hand the dealer busted withpublic void playerJoins(Player joined_player)
TableObserver
playerJoins
in interface TableObserver
joined_player
- the player that has joined the tablepublic void playerLeaves(Player left_player)
TableObserver
playerLeaves
in interface TableObserver
left_player
- the player that has left the tablepublic void playerBets(Player betting_player, int bet_amount, int bankroll)
TableObserver
playerBets
in interface TableObserver
betting_player
- the player that has made a betbet_amount
- the amount the player betbankroll
- the bankroll of the player, which includes the amount betpublic void playerInsures(Player betting_player, int bet_amount, int new_bankroll)
TableObserver
playerInsures
in interface TableObserver
betting_player
- the player that has made an insurance betbet_amount
- the amount the player insuresnew_bankroll
- the bankroll of the player, which includes the amount betpublic void playerDealt(Player dealt_player, PlayerHand player_hand)
TableObserver
playerDealt
in interface TableObserver
dealt_player
- the player that was dealt a handplayer_hand
- the hand dealt to the playerpublic void playerDraws(Player dealt_player, Card dealt_card, PlayerHand new_hand)
TableObserver
playerDraws
in interface TableObserver
dealt_player
- the player that draws a carddealt_card
- the new card the player drawsnew_hand
- the player hand including the drawn cardpublic void playerStands(Player dealt_player, PlayerHand player_hand)
TableObserver
playerStands
in interface TableObserver
dealt_player
- the player that standsplayer_hand
- the player hand stood withpublic void playerBusts(Player dealt_player, PlayerHand player_hand, int amount_lost, int new_bankroll)
TableObserver
playerBusts
in interface TableObserver
dealt_player
- the player that bustsplayer_hand
- the player hand busted withamount_lost
- the amount the player lostnew_bankroll
- the new bankroll of the player, after subtracting the losspublic void playerSplits(Player dealt_player, PlayerHand player_hand)
TableObserver
playerSplits
in interface TableObserver
dealt_player
- the player that splitsplayer_hand
- the player hand that was splitpublic void playerDoublesDown(Player dealt_player, Card dealt_card, PlayerHand new_hand)
TableObserver
playerDoublesDown
in interface TableObserver
dealt_player
- the player that doubles downdealt_card
- the final card the player drawsnew_hand
- the player hand including the drawn cardpublic void playerWins(Player dealt_player, PlayerHand player_hand, int amount_won, int new_bankroll)
TableObserver
playerWins
in interface TableObserver
dealt_player
- the player that wonplayer_hand
- the hand the player won onamount_won
- the amount the player wonnew_bankroll
- the new bankroll of the player, after adding the winningpublic void playerLoses(Player dealt_player, PlayerHand player_hand, int amount_lost, int new_bankroll)
TableObserver
playerLoses
in interface TableObserver
dealt_player
- the player that lostplayer_hand
- the hand the player lost onamount_lost
- the amount the player lostnew_bankroll
- the new bankroll of the player, after subtracting the losspublic void playerBlackjack(Player dealt_player, PlayerHand player_hand, int amount_won, int new_bankroll)
TableObserver
playerBlackjack
in interface TableObserver
dealt_player
- the player that got a blackjackplayer_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 winningpublic void playerPush(Player dealt_player, PlayerHand player_hand, int held_bankroll)
TableObserver
playerPush
in interface TableObserver
dealt_player
- the player that tied the dealerplayer_hand
- the hand the player pushed onheld_bankroll
- the unchanged bankroll of the playerpublic void playerWinsInsurance(Player dealt_player, int amount_won, int new_bankroll)
TableObserver
playerWinsInsurance
in interface TableObserver
dealt_player
- the player that won insuranceamount_won
- the amount the player wonnew_bankroll
- the new bankroll of the player, after adding the winningpublic void playerLosesInsurance(Player dealt_player, int amount_lost, int new_bankroll)
TableObserver
playerLosesInsurance
in interface TableObserver
dealt_player
- the player that lost insuranceamount_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 |