Hi everyone,
I just finished my first personnal project in Python which is a Blackjack simulator.
The objective was to simulate a real online Blackjack casino.
If you have any feebacks to improve the code and / or ideas about additional features. I would be happy to read them!
https://github.com/srocroix/BlackJack-project/blob/main/blackjack-project.py
Features:
-
Allow to play vs a computer.
-
Allow to bet virtual money.
-
Allow to set up a robot. This robot will play as much as you want. (ex: You want the robot to play 2000 games to collect some winrate Data)
-
The robot can use betting strategies as Martingale if you want.
-
Print out game Data at the end of each game.
Notice:
-
The computer really acts as a human dealer. Indeed this one starts by shuffling the shoe, then dealing the cards (one face up for him, one face up for the player, one face down for him and a last one face up for you). Once you have played, he will hit while his hand value is under 17.
-
If you have a BJ, the dealer will just show his full hand and won’t play.
-
If the dealer first card (card face up) is an Ace and he has BJ, you won’t be able to play.
-
The contains 6 decks. All casinos, don’t use 6 decks, it can be less or more. You can easily change the number of decks by changing the value of the “num_of_decks” variable.
-
When the shoe has 60 to 75 cards left, the plastic insert card is reached so the dealer pick a new shoe and shuffle it for the next game.
Additional future features:
-
I plan to add double down and split options.
-
I also may add more betting strategies.