Module rs_poker::core

source ·
Expand description

Allow all the core poker functionality to be used externally. Everything in core should be agnostic to poker style. This is the core module. It exports the non-holdem related code.

Structs

  • An iterator over the active players in a bit set.
  • Re-export Card, Value, and Suit The main struct of this library. This is a carrier for Suit and Value combined.
  • Make that functionality public. Given some cards create sets of possible groups of cards.
  • Export Deck Deck struct that can tell quickly if a card is in the deck
  • Export the trait and the result. FlatDeck is a deck of cards that allows easy indexing into the cards. It does not provide contains methods.
  • Everything in there should be public. Struct to hold cards.
  • A struct representing a bit set for players.

Enums

  • Export the trait and the results. All the different possible hand ranks. For each hand rank the u32 corresponds to the strength of the hand in comparison to others of the same rank.
  • Re-export Card, Value, and Suit Enum for the four different suits. While this has support for ordering it’s not sensical. The sorting is only there to allow sorting cards.
  • Re-export Card, Value, and Suit Card rank or value. This is basically the face value - 2

Traits

  • Export the trait and the results. Can this turn into a hand rank? There are default implementations for Hand and Vec<Card>.