poker-0.1.0.0: Texas holdem hand evaluation and simulation.
Safe HaskellNone
LanguageHaskell2010

Poker.Holdem

Description

... Module : Poker.Holdem Description : Texas Hold'em module Copyright : (c) Ghais Issa 2021

A variant of poker where two cards, known as hole cards, are dealt face down to each player, and then five community cards are dealt face up in three stages. The stages consist of a series of three cards ("the flop"), later an additional single card ("the turn" or "fourth street"), and a final card ("the river" or "fifth street"). Each player seeks the best five card poker hand from any combination of the seven cards; the five community cards and their two hole cards. ...

Synopsis

Documentation

data Hole Source #

Player's 2 cards.

Constructors

Hole !Card !Card 

Instances

Instances details
Eq Hole Source # 
Instance details

Defined in Poker.Holdem

Methods

(==) :: Hole -> Hole -> Bool #

(/=) :: Hole -> Hole -> Bool #

Show Hole Source # 
Instance details

Defined in Poker.Holdem

Methods

showsPrec :: Int -> Hole -> ShowS #

show :: Hole -> String #

showList :: [Hole] -> ShowS #

data Flop Source #

First three community cards

Constructors

Flop !Card !Card !Card 

Instances

Instances details
Eq Flop Source # 
Instance details

Defined in Poker.Holdem

Methods

(==) :: Flop -> Flop -> Bool #

(/=) :: Flop -> Flop -> Bool #

Show Flop Source # 
Instance details

Defined in Poker.Holdem

Methods

showsPrec :: Int -> Flop -> ShowS #

show :: Flop -> String #

showList :: [Flop] -> ShowS #

newtype Turn Source #

Fourth community card.

Constructors

Turn Card 

Instances

Instances details
Eq Turn Source # 
Instance details

Defined in Poker.Holdem

Methods

(==) :: Turn -> Turn -> Bool #

(/=) :: Turn -> Turn -> Bool #

Show Turn Source # 
Instance details

Defined in Poker.Holdem

Methods

showsPrec :: Int -> Turn -> ShowS #

show :: Turn -> String #

showList :: [Turn] -> ShowS #

newtype Street Source #

Fifth and last community card.

Constructors

Street Card 

Instances

Instances details
Eq Street Source # 
Instance details

Defined in Poker.Holdem

Methods

(==) :: Street -> Street -> Bool #

(/=) :: Street -> Street -> Bool #

Show Street Source # 
Instance details

Defined in Poker.Holdem

data Community Source #

All community cards.

Constructors

Community !Flop !Turn !Street 

Instances

Instances details
Eq Community Source # 
Instance details

Defined in Poker.Holdem

Show Community Source # 
Instance details

Defined in Poker.Holdem

data Hand Source #

A 7-card hand is made from a hole and community cards.

Constructors

Hand !Hole !Community 

Instances

Instances details
Eq Hand Source # 
Instance details

Defined in Poker.Holdem

Methods

(==) :: Hand -> Hand -> Bool #

(/=) :: Hand -> Hand -> Bool #

Show Hand Source # 
Instance details

Defined in Poker.Holdem

Methods

showsPrec :: Int -> Hand -> ShowS #

show :: Hand -> String #

showList :: [Hand] -> ShowS #

randomHand :: RVar Hand Source #

A random hand