poker_game v0.1.0 Poker View Source
Documentation for Poker
.
Link to this section Summary
Functions
Scores poker hand We convert our hand to a tuple with 2 elements: {ranking , {tuple with card rankings}} this can be easily compared as the rank is on the most sighificant place it gets compared first if we have identical ranks then we compare cards from the most sighificant
Starts the game
Link to this section Types
Specs
t() :: %Poker{ deck: CardDeck.deck(), pile: CardDeck.deck(), players: %{required(String.t()) => CardDeck.deck()} }
Defines poker game
Link to this section Functions
Specs
Scores poker hand We convert our hand to a tuple with 2 elements: {ranking , {tuple with card rankings}} this can be easily compared as the rank is on the most sighificant place it gets compared first if we have identical ranks then we compare cards from the most sighificant
Examples
iex> {1, {5, 4, 3, 2, 1}} > {3, {3, 2, 1}} false iex> {4, {5, 4, 3}} > {3, {3, 2, 1}} true
Specs
Specs
Starts the game