A game of Blackjack with graphical user interface.
Project description
blackjack-gui
Single-player Blackjack with GUI and CLI interfaces. Can be used to simulate games (with simple card counting) and learn basic strategy.
Installation
$ python3 -m venv venv
$ source venv/bin/activate
$ pip3 install blackjack-gui
Usage
GUI version
blackjack
CLI version
blackjack --gui=False [OPTION...]
Options:
Name | Default | Description |
---|---|---|
--stack |
1000 | Initial stack. Can be used with --gui=True too. |
--bet |
1 | Bet size. |
--n_games |
10 | Number of rounds to be played. |
--ai |
False | If True, computer plays instead of you. |
--count |
False | If True, ai uses card counting. |
--loglevel |
DEBUG | Adjust amount of logging: DEBUG or INFO. |
--cards |
Simulate certain starting hand only. E.g. --cards=A,8 . Shuffles the shoe after every hand. |
Examples
Open GUI version:
$ blackjack
With the default settings, play 10 rounds of Blackjack without GUI:
$ blackjack --gui=False
Let the computer play perfect basic game and use card counting technique to bring down the house:
$ blackjack --n_games=100000 --ai=True --count=True --loglevel=INFO --gui=False
Simulate soft 19 starting hand only:
$ blackjack --n_games=10000 --ai=True --loglevel=INFO --gui=False --cards=A,8
Notes
- Uses 6 decs and shuffling when 52 cards remaining in the shoe
- Insurance and even money not implemented
- Otherwise, rules follow: https://casinohelsinki.fi/en/games/blackjack-eng/
- Basic strategy according to American casino guidebook
- Card images taken from here.
Licence
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
blackjack-gui-0.0.9.tar.gz
(5.6 MB
view hashes)
Built Distribution
Close
Hashes for blackjack_gui-0.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91c81964c76b0e3c5838b4caadc8a33fc26e8ed1a5688fa6347a69aee86c037d |
|
MD5 | 6f812758f9db18e7c9a430a7c1ee0653 |
|
BLAKE2b-256 | 9c8c0081de7397a83370c33dde2a508593411b4a0526279364b072821622acda |