|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectblackjackanalyst.strategy.DefaultPlayer
public class DefaultPlayer
The default player strategy which immitates the dealer by hitting on any value below 16 or soft 17. On any other value, the player stands.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface blackjackanalyst.PlayerStrategy |
|---|
PlayerStrategy.PlayerStrategyAction |
| Constructor Summary | |
|---|---|
DefaultPlayer()
|
|
| Method Summary | |
|---|---|
void |
cardDealt(Card dealt_card)
This informs the strategy that the given card has been dealt to some player. |
PlayerStrategy.PlayerStrategyAction |
getAction(PlayerHand curr_hand,
Card dealer_card)
Returns the proper action, given the current hand. |
int |
getBet(int bankroll)
Notifies the player that a new betting round has started. |
int |
getInsuranceBet(PlayerHand curr_hand,
int bet_amount)
Notifies the player that the dealer is showing an ace as his up card and is offering insurance. |
void |
joinedTable(Table t)
This informs the strategy that the player has now joined a table. |
void |
leftTable(Table t)
This informs the strategy that the player has now left the table it previously joined. |
void |
shoeShuffled()
This informs the strategy that the shoe has been shuffled. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultPlayer()
| Method Detail |
|---|
public PlayerStrategy.PlayerStrategyAction getAction(PlayerHand curr_hand,
Card dealer_card)
PlayerStrategynull, the caller determines what action is taken.
getAction in interface PlayerStrategycurr_hand - the hand of cards belonging to the playerdealer_card - the card shown by the dealer
public void shoeShuffled()
PlayerStrategy
shoeShuffled in interface PlayerStrategypublic void cardDealt(Card dealt_card)
PlayerStrategy
cardDealt in interface PlayerStrategydealt_card - the card that was dealtpublic void joinedTable(Table t)
PlayerStrategy
joinedTable in interface PlayerStrategyt - the table the player has joinedpublic void leftTable(Table t)
PlayerStrategy
leftTable in interface PlayerStrategyt - the table the player has leftpublic int getBet(int bankroll)
PlayerStrategy0 and less than or equal to bankroll.
getBet in interface PlayerStrategybankroll - the current bankroll of the player
public int getInsuranceBet(PlayerHand curr_hand,
int bet_amount)
PlayerStrategy0, no insurance is taken.
getInsuranceBet in interface PlayerStrategycurr_hand - the hand of cards belonging to the playerbet_amount - the amount bet on the player hand
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||