-
Notifications
You must be signed in to change notification settings - Fork 22
Version 1.0.0 Roadmap
SirRender00 edited this page Feb 2, 2022
·
3 revisions
v1.0.0 will feature basic functionality, tests, and a basic text GUI.
- 32-bit integer card representations allowing fast evaluation and optimizing memory
- Constructors of the form
Card("Kd")
orCard(1452012)
where the integer is a well-formed representation - Helper attributes including
card.rank
,card.pretty_string
,card.suite
, etc.
-
evaluate(hand, board)
- Returns the rank of the best 5-card hand from a list of 5 to 7 cards. The rank is a number from 1 (strongest) to 7462 (weakest).
-
rank_to_string(rank)
- Returns the human readable string of the rank, e.g. "Flush, King High".
-
game.start_hand()
- Starts a new hand and resets the history.
-
game.take_action(action, value)
- The current player takes the given action (value is used only if action is RAISE).
-
texasholdem.ActionType
Enum- Includes
CALL
,CHECK
,RAISE
,ALL_IN
,FOLD
.
- Includes
-
texasholdem.HandPhase
Enum- Includes
PREHAND
,PREFLOP
,FLOP
,TURN
,RIVER
,SETTLE
.
- Includes
-
game.hand_phase
returns the currentHandPhase
. -
game.current_player
returns the current player number. -
game.chips_to_call(i)
returns how many chips playeri
needs to call. -
game.chips_at_stake(i)
returns how many chips playeri
could win.
-
TexasHoldEm
class has two history methods:- Class method
export_history(path)
writes the current history to a human-readable file in a minimalist format. - Static method
import_history(path)
reads the given history file and returns an iterator over the game as it happened.
- Class method
-
texasholdem.text_gui.TextGUI
Text-based GUI-
print_state(game)
prints the current state ofgame
. -
print_action(game)
prints the last action ofgame
. -
accept_input()
parses command line input to a tuple(ActionType, Optional[int])
. -
set_player_ids(Iterable[int])
allows the viewing of the given players' hands.
-