This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Create a Blackjack program in 3 parts | |
| # | |
| # part 1 - Blackjack classes - use a shoe of 6 decks of cards, and shuffle the shoe | |
| # if the card count gets < 100 reshuffle | |
| # part 2 - Blackjack game using classes and user input - assume every hand is worth $1, tracking win/loss amount | |
| # part 3 - Build a results table to show what strategy loses the least money | |
| # for each starting hand value for the player and the dealer, either hit or stand | |
| # and track the result just do a single hit or stand and then track win/lose/draw | |
| # simulate 100,000 hands, track our starting hand value and then randomly pick hit or stand | |
| # and track win/loss/draw result |