Why did I write this?
I orignally wrote this program after searching for a Black Jack program for my Palm and all I was able to find was crippleware (begware = shareware programs that constantly ask for money, crippleware = begware programs that stop working if you don't pay up). After looking at what was available I finally decided this was silly, I can write a program to do this so I did.
The original goal was to create a program that was fast (I don't really see a need for silly animations) and required minimal human interactions. This is why the program will sometimes just display new state, such as the results of a showdown between the dealer and the player, without asking for a confirmation.
As the program evolved I've added some new goals. Now it also attempts to mimic casino behavior as much as possible. Almost every feature of the game is configurable through the `Rules' menu. In addition, default rules for typical casinos in downtown Las Vegas, the Las Vegas Strip, Reno and Atlantic City can be selected.
The program also implements 4 different automated betting strategies. (This can be interesting to demonstrate things like how much money you could lose if you actually tried to use the Martingale system)
Finally the program has built in a basic playing strategy for Black Jack. You can ask for a hint whenever the dealer offers you a new card and the program will tell you what the basic playing strategy says you should do. (I don't give hints for insurance bets since you should never do this, even if you have a Black Jack this is still a bad bet.)
I haven't put any support for card counting into the program. Given that there are many different card counting schemes out there, I know nothing about them and it normally costs too much to buy the books that explain card counting I couldn't be bothered with this. If you're interested feel free to modify the source to support this.
The Palm display is broken up into several display areas. The very top row contains your current pot of money and the amount you are betting on the current hand. Right below the bet amount is an indicator that will tell you how much money you've won or lost when the hand is over.
Right below these status lines are the playing field. At the top the cards for the dealer are displayed, with a line showing the current count for the dealer's hand. Just below the dealer is the player's had, also with a line showing it's current count.
At the bottom right is a single line that identifies why you won or lost the last hand.
Finally, the bottom left is where all the player interaction occurs. This is where buttons appear that identify what action you wish to take, such as deal a new hand, take a hit and so on. Note that only legal actions are displayed, e.g. the `double' button will disappear after you've taken a hit.
Play is pretty obvious. Tap the `deal' button to start a hand. Pop up alerts will appear that allow you to play out the hand. When you finally stand or go bust the dealer's hand is dealt out and the showdown determines whether you won, lost or pushed.
The `Help' menus are self evident. `BJ Help' gives instructions on how to play the game of Black Jack, `Program Help' is this document and `About' is a shameless plug for the program.
The `Actions' menus allow you to control different aspects of the program.
This screen will reset your money pot and all the internal counters maintained by the program.
The program maintains statistics to see how well you are playing. It keeps track of the number of hands you've played and how many of those hands you've won or lost. The number of won and lost hands will normally not add up to he number of hands played, the difference being the number of hands pushed. I didn't have enough room to show pushes on the display so you'll have to do the arithmetic yourself.
Likewise, the program keeps track of all the money you've wagered and how much you've won and how much you've lost.
`Player Q'. This is a number that attempts to show how well you are playing. This is simply the percentage of hands where your decision matches what the basic Black Jack strategy decision would bet. The numbers in parentheses are the number of correct decisions you made and the total number of decisions.
`Default Rules'. This allows you to set the game's rules to match the typical rules you would find in a casino in one of 4 areas, downtown Las Vegas, the Las Vegas Strip, Reno and Atlantic City. Note that even in these areas there can be variations from casino to casino. I don't gamble myself so I haven't checked these defaults for accuracy. If you don't like the defaults you can always choose `Custom' and set the individual rules exactly the way you wish. Also note that the program doesn't adjust the default for the number of decks used. I know, some casinos change the rules based on the number of decks but that was too difficult to deal with so if you want to get that precise just use the `Rules' menu to set things up as you wish.
`Number of decks'. Sets the number of decks the dealer will use. Note that if you change the number of decks the program will force a shuffle of the new stack of cards.
`Depth before shuffle'. I know I said that the program doesn't deal with card counting but this is an option that might be interesting to card counters. It sets the depth through the card stack before the dealer shuffles the deck.
`Delay before dealer cards'. Likewise, I said I don't do silly animations but this is a sop to people who like that, so sue me. This option adds about a 1 second delay before displaying a new card for the dealer.
`Nanny mode'. The program keeps track of when you make a decision that violates the basic Black Jack strategy. When `Nanny mode' is on the program will suggest the proper play when you make a bad decision. You will then have one chance to change your play before the program continues on.
`Pot'. The initial pot of money you start with when you start a new game. Note that your pot of money is actually infinite, if you go negative the program will let you continue to play, running up a negative balance for as long as you want. Your credit is good with this program.
`Bet'. The amount of money you initially bet on each hand.
`Max'. The maximum amount of money to bet on each hand. The field only has meaning when the betting strategy, explained in the next paragraph, is set to `Bounce 1,2'.
`Strategy'. The betting strategy used. The 4 different strategies available are: `None' = bet the same amount on every hand, `Martingale' = double your bet whenever you lose (watch your money REALLY disappear if you hit a bad losing streak), `Bounce 1,2' = bet the `Bet' amount until you win, then bet the `Max' amount until you lose when you go back to the `Bet' amount, `Cycle 1,2,3,5' = start by betting 1x`Bet', if you win bet 2x`Bet', if you win bet 3x`Bet', if you win bet 5x`Bet' then go back to betting 1x`Bet', go back to 1x`Bet' whenever you lose.
`Dealer hits soft 17'. Dealer must take a card if he gets a hand of 17 where an Ace is counted as 11.
`Resplits'. The player is allowed to split again if he gets a new pair after splitting. Note that the program limits you to no more that 4 total hands so you can only split 3 times. I know that some casinos have different rules on the number of resplits but I couldn't find any definitive info on this so I didn't bother to make the number of resplits configurable. If enough people ask for this feature I could add it.
`Only 1 card after splitting aces'. Every casino I've every been in only allows you to receive 1 extra card for each hand after splitting a pair of aces. I believe that there are exceptions to this rule so I've added this option. If unchecked you can play out a hand from a split pair of aces just like any other hand (but you still can't get a Black Jack if you split aces).
`Double after split'. Some casinos allow you to double down after a split. Good luck finding a place that allows this.
`Doubling'. Controls when the player is allowed to double: `Any' = can double down on any two cards, `9-11' = can only double down on any two cards that add up to 9, 10 or 11, `10,11' = can only double down on two cards that add up to 10 or 11.
`Surrender'. Controls when the player can surrender (give up and lose half his bet). When legal surrender is only available immediately after the player receives his first 2 cards. `No' = surrender is not allowed, `Early' = can surrender before the dealer checks for a Black Jack if the dealer shows an Ace (note that this is almost never offerred in casinos), `Late' = can surrender after the dealer has checked for Black Jack.