Skip to main content

BlackDuck-v2

The second version of my recreation of the well-known gambling game Blackjack, made in Python using Pygame for the user interface.

Features

  • Save File: Save file function that saves your progress when exiting the window or game
  • Pygame UI: Pygame to display a window for a better UI, rather than a Command Line Interface
  • PyPI: Published on PyPI for easy access and installation of the game
  • Full Blackjack Action: Allows users to hit, stand, double down and split (max 1 split)
  • Chip-Based Betting: Replaced simple cash betting with physical chip betting and table space.
  • Chip Exchanging: Space that allows players to exchange their chips for other chips
  • Two-Hand Play: Two betting spaces allow the player to start with two hands
  • Statistics: Stats are tracked throughout the game and appear when the player runs out of chips
  • 6 Decks: The game runs with 6 playing card decks to prevent counting cards

Videos

https://github.com/user-attachments/assets/88797d72-ae88-46bc-a3bf-27622c33cf81

https://github.com/user-attachments/assets/e1411064-0543-459c-b19e-7e9bbab91d31

https://github.com/user-attachments/assets/c164994e-a1fd-47c3-b6ac-8c73027726d3

https://github.com/user-attachments/assets/2b0f2c18-4612-4728-96e1-f55488b0ae66

Images

Title screen of the game

Game screen when inputting code

Point scoring screen

How To Install

Requirements:

  • MacOS or Linux device
  • Python 3.9 or later (the latest to be safe)
  • Pip 22 or later (the latest to be safe)
  • Pygame 2.6.0 or later (should be installed when installing the package from Pypi)
  1. You'll need to have Python and pip installed.

    • You can follow this to install Python
    • You can follow this to install pip
  2. In Terminal or Command Prompt, enter the command:

    pip install blackduck-v2
    

    This will install the game. This is from the Pypi package blackduck-v2

  3. Once installed, you can use the commands:

    • bd2
    • blackduck-v2
    • play-bd2
    • play-blackduck-v2 (Capatalisation doesn't matter)
  4. Enjoy and good luck gambling

How To Play

After running one of the entry commands (bd2, blackduck-v2, play-bd2, play-blackduck-v2) you will be presented with the pygame UI as a casino/blackjack table.

You'll see many different things:

  • On the centre you'll see the 2 betting areas (space to put your chips when betting) and control buttons for: starting, hitting, standing, doubling down and splitting.
  • On the bottom, you'll see the chips you have, in which you start with 5 Ones, 2 Fives and 1 Ten.
  • On the top right you'll see the exchange space. This is the space you put your chips in to exchange for other denominations. To exchange chips you have to put any amount of chips in the exchange area and on the left side, a menu will appear. In the menu you can select the chips to exchange (left click) and remove chips (right click). Once the total values of the chips selected is equal to the values of the chips you place in the exchange area, you can press the green button to exchange the chips.

To actually play the game there are 4 steps:

  1. Move the chip in to either betting space to choose the ammount to bet.
  2. Press the 'bet' button to start the hand/game.
  3. Use 4 of the function to play blackjack.
  4. Watch as you start winning or losing blackjack games.

Metadata

Release files for blackduck-v2 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for blackduck-v2 0.1.2
File Size Uploaded Provenance Actions
blackduck_v2-0.1.2.tar.gz 8.1 MB With provenance Details for blackduck_v2-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for blackduck-v2 0.1.2
File Interpreter ABI Platform Actions
blackduck_v2-0.1.2-py3-none-any.whl Python 3 none any Details for blackduck_v2-0.1.2-py3-none-any.whl

Total release size: 13.3 MB

Release files / blackduck_v2-0.1.2.tar.gz

Download URL blackduck_v2-0.1.2.tar.gz
Size 8.1 MB
Tags Source
SHA-256 checksum
How to use checksums
6e7ea54218432638e09e229fe950034ad45b23c7ddc4f410f9f0e1a141d670d8
BLAKE2b-256 checksum
How to use checksums
80219f1ea0dd1863685627eea2b82c11fb8e904e1824569b3f91195f6e24f26e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Release files / blackduck_v2-0.1.2-py3-none-any.whl

Download URL blackduck_v2-0.1.2-py3-none-any.whl
Size 5.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
16c7dc17b27e831b22d97bbb824ca77b64b9353f24d81ca4a6e15c0b4e03e4d6
BLAKE2b-256 checksum
How to use checksums
d935c59d9e754ed4500e23ca6326a515ed739f173a60e69ef1bc807688040b50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Security for blackduck-v2 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for blackduck_v2-0.1.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page