You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 21, 2023. It is now read-only.
This is a small program which allows users to represent and compare poker hands.
The main file is poker.py, where the Hand class is located. This currently does not have a command-line interface, and it must be run from a python interactive prompt.
Setup:
In order to set up your environment, please make sure that a legacy enum package is uninstalled by running 'pip uninstall enum'. Please make sure that enum32 is installed by running 'pip install enum32'.
Usage:
Cards are represented by their number or first letter for the non-numeric cards (J, Q, K, A) and the suits are represented by their first letter (H, C, D, S) and stored as a JSON array. So for example a hand J♥ 4♣ 4♠ J♣ 9♥ will be represented as ["JH", "4C", "4S", "JC", "9H"]. Hands are created by passing the JSON array into the Hand class. Hands can be compared using normal comparison operators. Five-card hands will be created from JSON arrays that contain more than five cards.