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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a8626969115db46d40369ae2d2b9c058ef58f628469df659e2220fc59620d91
|
|
| MD5 |
0fa6c762ae83fc69d6043aa296c501bc
|
|
| BLAKE2b-256 |
b259e9dbdf8dd3ee77eb87f05580c06731c1e17b8787b36e11e5802a94d3debf
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd28cec8adce8b5268e7b7171856017c528e35635708c35d3340301663599e39
|
|
| MD5 |
e74e8f59a3dc1b79ab7f43ad383ff064
|
|
| BLAKE2b-256 |
4b73cce64ca45e9969e74236bd63e69941b26aa43c1dcb0123d4016f1e87f296
|
File details
Details for the file pokercore-0.1.4.win32.exe.
File metadata
- Download URL: pokercore-0.1.4.win32.exe
- Upload date:
- Size: 206.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a55d3feb50de35d6f34f64c06411dcd68fe5421fcf9a700c578c10e4add413dd
|
|
| MD5 |
5dcbefc4694557c6abe9e92d954f3bde
|
|
| BLAKE2b-256 |
b39a4e707540536ba1eb119943b68ecb35f8ad7a14fca0478ed57d05576ccecd
|