blackjackanalyst
Interface TableObserver

All Known Implementing Classes:
AbstractTableObserver, ConsoleTableObserver, WinLossTableObserver

public interface TableObserver

An interface that allows neutral observation of the table.

Author:
Michael Parker

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 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.
 

Method Detail

newRound

void newRound(java.util.List<Player> players)
This method is invoked before each new round of blackjack.

Parameters:
players - the players playing this round

shoeShuffled

void shoeShuffled()
This method is invoked when the shoe is shuffled.


dealerDealt

void dealerDealt(Card up_card)
This method is invoked when the dealer is dealt its up card.

Parameters:
up_card - the up card of the dealer

dealerDealt

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.

Parameters:
down_card - the revealed down card of the dealer
dealer_hand - the dealer hand, including both its up and down card

dealerBlackjack

void dealerBlackjack(Hand dealer_hand)
This method is invoked when the dealer reveals its down card and receives a blackjack.

Parameters:
dealer_hand - the dealer hand that is a blackjack

dealerDraws

void dealerDraws(Card dealt_card,
                 Hand new_hand)
This method is invoked when the dealer hits and is drawn a new card.

Parameters:
dealt_card - the new card the dealer draws
new_hand - the dealer hand including its drawn card

dealerStands

void dealerStands(Hand dealer_hand)
This method is invoked when the dealer stands.

Parameters:
dealer_hand - the hand the dealer stood with

dealerBusts

void dealerBusts(Hand dealer_hand)
This method is invoked when the dealer busts.

Parameters:
dealer_hand - the hand the dealer busted with

playerJoins

void playerJoins(Player joined_player)
This method is invoked when a player joins a table.

Parameters:
joined_player - the player that has joined the table

playerLeaves

void playerLeaves(Player left_player)
This method is invoked when a player leaves the table.

Parameters:
left_player - the player that has left the table

playerBets

void playerBets(Player betting_player,
                int bet_amount,
                int bankroll)
This method is invoked when a player makes a bet.

Parameters:
betting_player - the player that has made a bet
bet_amount - the amount the player bet
bankroll - the bankroll of the player, which includes the amount bet

playerInsures

void playerInsures(Player betting_player,
                   int bet_amount,
                   int bankroll)
This method is invoked when a player makes his insurance bet.

Parameters:
betting_player - the player that has made an insurance bet
bet_amount - the amount the player insures
bankroll - the bankroll of the player, which includes the amount bet

playerDealt

void playerDealt(Player dealt_player,
                 PlayerHand player_hand)
This method is invoked when a player is dealt a new hand.

Parameters:
dealt_player - the player that was dealt a hand
player_hand - the hand dealt to the player

playerDraws

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.

Parameters:
dealt_player - the player that draws a card
dealt_card - the new card the player draws
new_hand - the player hand including the drawn card

playerStands

void playerStands(Player dealt_player,
                  PlayerHand player_hand)
This method is invoked when a player stands.

Parameters:
dealt_player - the player that stands
player_hand - the player hand stood with

playerBusts

void playerBusts(Player dealt_player,
                 PlayerHand player_hand,
                 int amount_lost,
                 int new_bankroll)
This method is invoked when a player busts.

Parameters:
dealt_player - the player that busts
player_hand - the player hand busted with
amount_lost - the amount the player lost
new_bankroll - the new bankroll of the player, after subtracting the loss

playerSplits

void playerSplits(Player dealt_player,
                  PlayerHand player_hand)
This method is invoked when a player splits the hand.

Parameters:
dealt_player - the player that splits
player_hand - the player hand that was split

playerDoublesDown

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.

Parameters:
dealt_player - the player that doubles down
dealt_card - the final card the player draws
new_hand - the player hand including the drawn card

playerWins

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.

Parameters:
dealt_player - the player that won
player_hand - the hand the player won on
amount_won - the amount the player won
new_bankroll - the new bankroll of the player, after adding the winning

playerLoses

void playerLoses(Player dealt_player,
                 PlayerHand player_hand,
                 int amount_lost,
                 int new_bankroll)
This method is invoked when a player loses.

Parameters:
dealt_player - the player that lost
player_hand - the hand the player lost on
amount_lost - the amount the player lost
new_bankroll - the new bankroll of the player, after subtracting the loss

playerBlackjack

void playerBlackjack(Player dealt_player,
                     PlayerHand player_hand,
                     int amount_won,
                     int new_bankroll)
This method is invoked when a player gets a blackjack.

Parameters:
dealt_player - the player that got a blackjack
player_hand - the hand the player received blackjack on
amount_won - the amount the player won on blackjack
new_bankroll - the new bankroll of the player, after adding the winning

playerPush

void playerPush(Player dealt_player,
                PlayerHand player_hand,
                int held_bankroll)
This method is invoked when a player ties the dealer, or pushes.

Parameters:
dealt_player - the player that tied the dealer
player_hand - the hand the player pushed on
held_bankroll - the unchanged bankroll of the player

playerWinsInsurance

void playerWinsInsurance(Player dealt_player,
                         int amount_won,
                         int new_bankroll)
This method is invoked when a player wins his insurance bet.

Parameters:
dealt_player - the player that won insurance
amount_won - the amount the player won
new_bankroll - the new bankroll of the player, after adding the winning

playerLosesInsurance

void playerLosesInsurance(Player dealt_player,
                          int amount_lost,
                          int new_bankroll)
This method is invoked when a player loses his insurance bet.

Parameters:
dealt_player - the player that lost insurance
amount_lost - the amount the player lost
new_bankroll - the new bankroll of the player, after subtracting the loss