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.
>>> 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
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|File Name & Checksum SHA256 Checksum Help||Version||File Type||Upload Date|
|pokercore-0.1.4.tar.gz (7.2 kB) Copy SHA256 Checksum SHA256||–||Source||Jan 16, 2015|
|pokercore-0.1.4.win32.exe (206.6 kB) Copy SHA256 Checksum SHA256||any||Windows Installer||Jan 16, 2015|
|pokercore-0.1.4.zip (12.2 kB) Copy SHA256 Checksum SHA256||–||Source||Jan 16, 2015|