Skip to content

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.

Features

Card Module

  • 32-bit integer card representations allowing fast evaluation and optimizing memory
  • Constructors of the form Card("Kd") or Card(1452012) where the integer is a well-formed representation
  • Helper attributes including card.rank, card.pretty_string, card.suite, etc.

Evaluator Module

  • 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 Module

Game Action API

  • 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).

Game Information API

  • texasholdem.ActionType Enum
    • Includes CALL, CHECK, RAISE, ALL_IN, FOLD.
  • texasholdem.HandPhase Enum
    • Includes PREHAND, PREFLOP, FLOP, TURN, RIVER, SETTLE.
  • game.hand_phase returns the current HandPhase.
  • game.current_player returns the current player number.
  • game.chips_to_call(i) returns how many chips player i needs to call.
  • game.chips_at_stake(i) returns how many chips player i could win.

Game History

  • 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.

GUI Module

  • texasholdem.text_gui.TextGUI Text-based GUI
    • print_state(game) prints the current state of game.
    • print_action(game) prints the last action of game.
    • 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.