Skip to main content

A poker engine core, in Python

Project description

A poker engine core, in Python

pokercore provides 3 classes to be used in a poker engine. Card (a playing card), Hand (a poker hand consisting of Cards, with evaluation capabilities) and Deck (a deck of Cards).

It is a simple starter, mainly written for exploring purposes, but can be extended and/or used to build something bigger. It is released under the MIT license.

Example

>>> from pokercore import Deck, Hand
>>> deck = Deck()
>>> first = Hand(deck.draw(5))
>>> first
Hand(one pair: Card(9c), Card(9h), Card(Ac), Card(Jh), Card(2h))
>>> second = Hand(deck.draw(5))
>>> second
Hand(high card: Card(As), Card(Kc), Card(9s), Card(7h), Card(4h))
>>> first > second
True

Project details


Download files

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

Source Distributions

pokercore-0.1.4.zip (12.2 kB view details)

Uploaded Source

pokercore-0.1.4.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

pokercore-0.1.4.win32.exe (206.6 kB view details)

Uploaded Source

File details

Details for the file pokercore-0.1.4.zip.

File metadata

  • Download URL: pokercore-0.1.4.zip
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pokercore-0.1.4.zip
Algorithm Hash digest
SHA256 4a8626969115db46d40369ae2d2b9c058ef58f628469df659e2220fc59620d91
MD5 0fa6c762ae83fc69d6043aa296c501bc
BLAKE2b-256 b259e9dbdf8dd3ee77eb87f05580c06731c1e17b8787b36e11e5802a94d3debf

See more details on using hashes here.

File details

Details for the file pokercore-0.1.4.tar.gz.

File metadata

  • Download URL: pokercore-0.1.4.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pokercore-0.1.4.tar.gz
Algorithm Hash digest
SHA256 fd28cec8adce8b5268e7b7171856017c528e35635708c35d3340301663599e39
MD5 e74e8f59a3dc1b79ab7f43ad383ff064
BLAKE2b-256 4b73cce64ca45e9969e74236bd63e69941b26aa43c1dcb0123d4016f1e87f296

See more details on using hashes here.

File details

Details for the file pokercore-0.1.4.win32.exe.

File metadata

File hashes

Hashes for pokercore-0.1.4.win32.exe
Algorithm Hash digest
SHA256 a55d3feb50de35d6f34f64c06411dcd68fe5421fcf9a700c578c10e4add413dd
MD5 5dcbefc4694557c6abe9e92d954f3bde
BLAKE2b-256 b39a4e707540536ba1eb119943b68ecb35f8ad7a14fca0478ed57d05576ccecd

See more details on using hashes here.

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