Skip to main content

A Single-Deck Blackjack hand generator and calculator

Project description

EasyBlackjack

License Last commit Last release

EasyBlackjack is a Single-Deck Blackjack hand generator and calculator.


Installation

Use the package manager Pip to install EasyBlackjack.

pip install EasyBlackjack

Usage

from easyblackjack import EasyBlackjack
EasyBlackjack.generate_cards()
# Returns two random cards with their value.
# For example:
# {
#     'card_one': {
#         'value': '10',
#         'suit': 'H'
#     },
#     'card_two': {
#         'value': '4',
#         'suit': 'S'
#     },
#     'points': 14
# }
EasyBlackjack.calculate_points(['A', '6', '3'])
# Returns the hand value.
# For example:
# 20

License

EasyBlackjack is licensed under the terms of the Creative Commons Zero v1.0 Universal license.

For more information, see the Creative Commons website.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

EasyBlackjack-0.1.6.tar.gz (6.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page