Skip to main content

Command Line Single-player game of Texas Hold'Em poker

Project description

General Info

Command Line Single-player game of Texas Hold'Em poker.

At the beginning of the game, you are asked to define how much cash each player will receive along with how many players you would like to play against. You can select from 1 to 4 players. Your competition is then randomly created and a player order is defined for the duration of the game. This order is used to control the blind and betting process.

The game consists of the following stages:

  • Preflop: two pocket cards are dealt to each player and big/small blinds are processed
  • Flop: discard top card from the stack and deal three community cards
  • Turn: discard top card from the stack and deal one community card
  • River: discard top card from the stack and deal last community card
  • Showdown: player best hands are evaluated and winner is selected

After each of the above stages a round of betting takes place following the defined player order allowing players to check, call, raise or fold. If a player folds, they are simply removed from the player order and the game will continue with the remaining players. During the final stage of the game, the best hand for each player is selected, compared against other players and a winner is selected.

Currently, logic for the following hands is supported:

  • Three of a Kind
  • Two Pair
  • Pair
  • High Card

Additionally, the game only supports use of white chips. I created issues for the remaining poker hands and chip denominations and plan to add them at a later date. While I have written and conducted a lot of testing to ensure a high quality experience, it's possible bugs do exist. Please report any you might experience and I will do my best to squash them promptly.

Setup

$ pip install play-poker
$ python -m poker

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

play-poker-0.1.2.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

play_poker-0.1.2-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file play-poker-0.1.2.tar.gz.

File metadata

  • Download URL: play-poker-0.1.2.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for play-poker-0.1.2.tar.gz
Algorithm Hash digest
SHA256 91c2b6cfb6ea923b6b7c117d2c92fd9286b6844e802382cf8eac3bb7fe3522ba
MD5 0073d00a7963f25350ef459795b9bd8d
BLAKE2b-256 e77ce4434f12cd1ef9a12635aafff0be7e2b8f923d860634636bd3cbb3985b5a

See more details on using hashes here.

File details

Details for the file play_poker-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: play_poker-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for play_poker-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0d1702c0d4483119da6d0ae8b19b3016f6fc66bb3084c47c5897a8a1191c18bd
MD5 7ae6957d62d0c8f902199d06320eaca9
BLAKE2b-256 e2f2b4e5a3969e876b219f0fe483e578af6fe0587eb9c73359d75c51412469f7

See more details on using hashes here.

Supported by

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