blackjackanalyst.strategy
Class TrueCountBetPlayer
java.lang.Object
blackjackanalyst.strategy.BasicStrategyPlayer
blackjackanalyst.strategy.TrueCountBetPlayer
- All Implemented Interfaces:
- PlayerStrategy
- Direct Known Subclasses:
- ModifiedBasicStrategyPlayer
public class TrueCountBetPlayer
- extends BasicStrategyPlayer
A player that abides by the principles of BasicStrategyPlayer.
Additionally, this player counts cards using the hi-lo system and a true
count (TC), and adjusts his bet accordingly:
- TC +1 or lower: initial bet
- TC +2: 2x initial bet
- TC +3: 3x initial bet
- TC +4: 5x initial bet
- TC greater than +4: 10x initial bet
- Author:
- Michael Parker
|
Method Summary |
void |
cardDealt(Card dealt_card)
This informs the strategy that the given card has been dealt to some
player. |
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 |
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 |
TrueCountBetPlayer
public TrueCountBetPlayer()
shoeShuffled
public void shoeShuffled()
- Description copied from interface:
PlayerStrategy
- This informs the strategy that the shoe has been shuffled.
- Specified by:
shoeShuffled in interface PlayerStrategy- Overrides:
shoeShuffled in class BasicStrategyPlayer
cardDealt
public void cardDealt(Card dealt_card)
- Description copied from interface:
PlayerStrategy
- This informs the strategy that the given card has been dealt to some
player.
- Specified by:
cardDealt in interface PlayerStrategy- Overrides:
cardDealt in class BasicStrategyPlayer
- Parameters:
dealt_card - the card that was dealt
getBet
public int getBet(int bankroll)
- Description copied from interface:
PlayerStrategy
- Notifies the player that a new betting round has started. The bet made by
the player is returned, which must be greater than or equal to
0 and less than or equal to bankroll.
- Specified by:
getBet in interface PlayerStrategy- Overrides:
getBet in class BasicStrategyPlayer
- Parameters:
bankroll - the current bankroll of the player
- Returns:
- the bet made by the player
getInsuranceBet
public int getInsuranceBet(PlayerHand curr_hand,
int bet_amount)
- Description copied from interface:
PlayerStrategy
- Notifies the player that the dealer is showing an ace as his up card and
is offering insurance. This method returns the amount the player wants to
insure, up to half his original bet. If this method returns
0, no insurance is taken.
- Specified by:
getInsuranceBet in interface PlayerStrategy- Overrides:
getInsuranceBet in class BasicStrategyPlayer
- Parameters:
curr_hand - the hand of cards belonging to the playerbet_amount - the amount bet on the player hand
- Returns:
- the amount of money the player wants to insure