|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectblackjackanalyst.observer.ConsoleTableObserver
public class ConsoleTableObserver
An implementation of interface TableObserver that writes to
the console.
| 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. |
static ConsoleTableObserver |
getInstance()
|
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. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static ConsoleTableObserver getInstance()
public void newRound(java.util.List<Player> players)
TableObserver
newRound in interface TableObserverplayers - the players playing this roundpublic void shoeShuffled()
TableObserver
shoeShuffled in interface TableObserverpublic void dealerDealt(Card up_card)
TableObserver
dealerDealt in interface TableObserverup_card - the up card of the dealer
public void dealerDealt(Card down_card,
Hand dealer_hand)
TableObserver
dealerDealt in interface TableObserverdown_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 TableObserverdealer_hand - the dealer hand that is a blackjack
public void dealerDraws(Card dealt_card,
Hand new_hand)
TableObserver
dealerDraws in interface TableObserverdealt_card - the new card the dealer drawsnew_hand - the dealer hand including its drawn cardpublic void dealerStands(Hand dealer_hand)
TableObserver
dealerStands in interface TableObserverdealer_hand - the hand the dealer stood withpublic void dealerBusts(Hand dealer_hand)
TableObserver
dealerBusts in interface TableObserverdealer_hand - the hand the dealer busted withpublic void playerJoins(Player joined_player)
TableObserver
playerJoins in interface TableObserverjoined_player - the player that has joined the tablepublic void playerLeaves(Player left_player)
TableObserver
playerLeaves in interface TableObserverleft_player - the player that has left the table
public void playerBets(Player betting_player,
int bet_amount,
int bankroll)
TableObserver
playerBets in interface TableObserverbetting_player - the player that has made a betbet_amount - the amount the player betbankroll - the bankroll of the player, which includes the amount bet
public void playerInsures(Player betting_player,
int bet_amount,
int bankroll)
TableObserver
playerInsures in interface TableObserverbetting_player - the player that has made an insurance betbet_amount - the amount the player insuresbankroll - the bankroll of the player, which includes the amount bet
public void playerDealt(Player dealt_player,
PlayerHand player_hand)
TableObserver
playerDealt in interface TableObserverdealt_player - the player that was dealt a handplayer_hand - the hand dealt to the player
public void playerDraws(Player dealt_player,
Card dealt_card,
PlayerHand new_hand)
TableObserver
playerDraws in interface TableObserverdealt_player - the player that draws a carddealt_card - the new card the player drawsnew_hand - the player hand including the drawn card
public void playerStands(Player dealt_player,
PlayerHand player_hand)
TableObserver
playerStands in interface TableObserverdealt_player - the player that standsplayer_hand - the player hand stood with
public void playerBusts(Player dealt_player,
PlayerHand player_hand,
int amount_lost,
int new_bankroll)
TableObserver
playerBusts in interface TableObserverdealt_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 loss
public void playerSplits(Player dealt_player,
PlayerHand player_hand)
TableObserver
playerSplits in interface TableObserverdealt_player - the player that splitsplayer_hand - the player hand that was split
public void playerDoublesDown(Player dealt_player,
Card dealt_card,
PlayerHand new_hand)
TableObserver
playerDoublesDown in interface TableObserverdealt_player - the player that doubles downdealt_card - the final card the player drawsnew_hand - the player hand including the drawn card
public void playerWins(Player dealt_player,
PlayerHand player_hand,
int amount_won,
int new_bankroll)
TableObserver
playerWins in interface TableObserverdealt_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 winning
public void playerLoses(Player dealt_player,
PlayerHand player_hand,
int amount_lost,
int new_bankroll)
TableObserver
playerLoses in interface TableObserverdealt_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 loss
public void playerBlackjack(Player dealt_player,
PlayerHand player_hand,
int amount_won,
int new_bankroll)
TableObserver
playerBlackjack in interface TableObserverdealt_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 winning
public void playerPush(Player dealt_player,
PlayerHand player_hand,
int held_bankroll)
TableObserver
playerPush in interface TableObserverdealt_player - the player that tied the dealerplayer_hand - the hand the player pushed onheld_bankroll - the unchanged bankroll of the player
public void playerWinsInsurance(Player dealt_player,
int amount_won,
int new_bankroll)
TableObserver
playerWinsInsurance in interface TableObserverdealt_player - the player that won insuranceamount_won - the amount the player wonnew_bankroll - the new bankroll of the player, after adding the winning
public void playerLosesInsurance(Player dealt_player,
int amount_lost,
int new_bankroll)
TableObserver
playerLosesInsurance in interface TableObserverdealt_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 | |||||||||