Blackjack started out as a demo program for a card class that emphasized compactness and ease of use. That program is available at /cards/cardsdemo.html
Advanced Blackjack (43K) is a casino style blackjack game that has a simulation feature. While casino blackjack on a computer is fun, it is a whole lot more fun if you have a target to shoot for. The simulation provides you with a sample series of games, plays the games, and gives you a money goal. You then can try to beat the computer. Double down, splits, and insurance are also allowed.
The simulation is configurable and that is one of its best features. You can invent your own card rules and test them here without needing to recompile the source code! Just look at the HTML when you load the above game.
Big Rule Simulation(43K) is an example of the above game with the simulation feature jacked up to 10,000 hands. This simulation, if you choose to fire it up when the game appears, will take about 3-8 minutes to run depending on your computer capability. A significant statistics database is compiled and shown. Read it carefully! It uses a complex series of rules that I cribbed from the Paiute Game Page. It will lose a LOT in the long run!
Dirt Simple(43K) is an example of the above game with the simulation feature jacked up to 10,000 hands. The rules it uses are dirt simple. Hit anything under 12, stay on anything over 11. The simulation (if you choose to run it) takes about 3-8 minutes depending on your computer capability. Compare the output of this with the output of the casino recommended rules above!
While I was making this program, I learned one important rule. Don't play blackjack at a casino! If you do, then don't play for hours on end. Just hit the tables for 20 or 30 hands and then go relax in the pool. You stand a better chance of winning that way. The longer you play, the more the odds favor the dealer. Over 1000 or more hands, you simply won't win.