BlackjackSim is a Blackjack card game simulator that can be played interactively or automatically to generate game-play statistics.
Project description
BlackjackSim
Source code: GitHub
BlackjackSim is a Python implementation of the Blackjack card game. It allows interactive play with one player and a computer dealer. It also includes a simulation mode where both the dealer and the player are played by the computer. Simulation mode can be used to analyze different player strategies over many hands, and to generate game-play statistics. In simulation mode, the player uses a play strategy described by Hoyle's Rules of Games.
Credit where credit is due
- The Strategy design pattern is used to implement playing strategies, and follows the concepts, UML diagrams, and examples provided in "Design Patterns: Elements of Reusable Object-Oriented Software," by Eric Gamma, Richard Helm, Ralph Johnson, and John Vlissides, published by Addison-Wesley, 1995.
- The
HoylePlayerPlayStrategyclass implements the player strategy as described in "Hoyle's Rules of Games," by A.H. Morehead and G. Mott-Smith, second revised edition, published by Signet, 1983.
Requirements
Usage
To play the game interactively or to run various simulations:
python -m BlackjackSim.main
A menu of options for play and simulation will be presented.
Unittests
Unit tests for BlackJackSim have filenames starting with test_. To run the unit tests,
type python -m unittest discover -s .\..\tests -v in a terminal window in the project directory.
License
MIT License. See the LICENSE file for details
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file blackjacksim-1.0.0.tar.gz.
File metadata
- Download URL: blackjacksim-1.0.0.tar.gz
- Upload date:
- Size: 36.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63926cccaf0b15a5d4f773779056570a76d494eb5953b7417b658b2c3a47ce80
|
|
| MD5 |
f223e322b03ba286a5cf8befc7868ce7
|
|
| BLAKE2b-256 |
6f20fb27c88bb710ae998cca825fa2282ff8dad1c3b5dd46803a0a6be6fb7ee6
|
Provenance
The following attestation bundles were made for blackjacksim-1.0.0.tar.gz:
Publisher:
release.yml on KevinRGeurts/BlackjackSim
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
blackjacksim-1.0.0.tar.gz -
Subject digest:
63926cccaf0b15a5d4f773779056570a76d494eb5953b7417b658b2c3a47ce80 - Sigstore transparency entry: 769264687
- Sigstore integration time:
-
Permalink:
KevinRGeurts/BlackjackSim@bffe471fcf9b9b46a518c53325cfd5842e7f987e -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/KevinRGeurts
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@bffe471fcf9b9b46a518c53325cfd5842e7f987e -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file blackjacksim-1.0.0-py3-none-any.whl.
File metadata
- Download URL: blackjacksim-1.0.0-py3-none-any.whl
- Upload date:
- Size: 23.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
485dec33bb8a39da6eeccdb26ee5286388168853689691b815de49f8ce9c5573
|
|
| MD5 |
ad92c278da122b4deefdfe9b5b4aa706
|
|
| BLAKE2b-256 |
01d0438c4452a9d6790ced6b20841cc6f9b63929599b6e9d39ef53a4c5ed82b7
|
Provenance
The following attestation bundles were made for blackjacksim-1.0.0-py3-none-any.whl:
Publisher:
release.yml on KevinRGeurts/BlackjackSim
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
blackjacksim-1.0.0-py3-none-any.whl -
Subject digest:
485dec33bb8a39da6eeccdb26ee5286388168853689691b815de49f8ce9c5573 - Sigstore transparency entry: 769264695
- Sigstore integration time:
-
Permalink:
KevinRGeurts/BlackjackSim@bffe471fcf9b9b46a518c53325cfd5842e7f987e -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/KevinRGeurts
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@bffe471fcf9b9b46a518c53325cfd5842e7f987e -
Trigger Event:
workflow_dispatch
-
Statement type: