Skip to main content

Card Game Base

Create Card Games with ease

How to install:

pip install CardGameBase or pip3 install CardGameBase

How to use:

from CardGameBase.Utility import create_classic_deck
from CardGameBase import Hand

# Create a classic 52 card deck and shuffle
my_deck = create_classic_deck()
my_deck.shuffle()

# Create hands for 2 players
my_hand = Hand(my_deck)
my_friends_hand = Hand(my_deck)

# Take cards
for i in range(7):
    my_hand.draw()
    my_friends_hand.draw()

# Display both players hands
print(my_hand, f"= {my_hand.get_total_value()}")
print(my_friends_hand, f"= {my_friends_hand.get_total_value()}")

# Check who has the highest hand value
if my_hand > my_friends_hand:
    print("You won!")
else: 
    print("Your friend won!")

For more Information please have look at the Documentation.

Metadata

Release files for CardGameBase 1.0.6

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

Source distribution (sdist)

Source distribution for CardGameBase 1.0.6
File Size Uploaded Provenance Actions
CardGameBase-1.0.6.tar.gz 6.6 kB Without provenance Details for CardGameBase-1.0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for CardGameBase 1.0.6
File Interpreter ABI Platform Actions
CardGameBase-1.0.6-py3-none-any.whl Python 3 none any Details for CardGameBase-1.0.6-py3-none-any.whl

Total release size: 14.7 kB

Release files / CardGameBase-1.0.6.tar.gz

Download URL CardGameBase-1.0.6.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
13cc97ee5063458a8d26cadc1f324a04abae04c24a4f7747c91f4d764e3c2c9b
BLAKE2b-256 checksum
How to use checksums
177e6d4cd12e592b4626ed590f1545f429eff84669dd26c21de9bf0df8d0c07b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.11

Release files / CardGameBase-1.0.6-py3-none-any.whl

Download URL CardGameBase-1.0.6-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bf24cf5b9153e031749d2dc21879af2e8fdefa55427cfc86ffbba923b2b18e38
BLAKE2b-256 checksum
How to use checksums
f2574a2a7a15c1b37c41331c8838b7ab742b503e5d57669714353b61a5ca709c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.11

Security for CardGameBase 1.0.6

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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