Copyright | (c) 2017 Christopher A. Gorski |
---|---|
License | MIT |
Maintainer | Christopher A. Gorski <cgorski@cgorski.org> |
Safe Haskell | Safe |
Language | Haskell2010 |
The Game.Game.Poker module provides operations for five card poker.
- data AceRank
- data PokerHand
- data PokerHandType
- cardsOfPokerHand :: PokerHand -> [PlayingCard]
- typeOfPokerHand :: PokerHand -> PokerHandType
- allPossibleHands :: [[PlayingCard]]
- allRoyalFlush :: [[PlayingCard]]
- allStraightFlush :: [[PlayingCard]]
- allFourOfAKind :: [[PlayingCard]]
- allFullHouse :: [[PlayingCard]]
- allFlush :: [[PlayingCard]]
- allStraight :: [[PlayingCard]]
- allThreeOfAKind :: [[PlayingCard]]
- allTwoPair :: [[PlayingCard]]
- allPair :: [[PlayingCard]]
- allHighCard :: [[PlayingCard]]
- isRoyalFlush :: [PlayingCard] -> Bool
- isStraightFlush :: [PlayingCard] -> Bool
- isFourOfAKind :: [PlayingCard] -> Bool
- isFullHouse :: [PlayingCard] -> Bool
- isFlush :: [PlayingCard] -> Bool
- isStraight :: [PlayingCard] -> Bool
- isThreeOfAKind :: [PlayingCard] -> Bool
- isTwoPair :: [PlayingCard] -> Bool
- isPair :: [PlayingCard] -> Bool
- isHighCard :: [PlayingCard] -> Bool
- mkHand :: [PlayingCard] -> Maybe PokerHand
- mkRoyalFlush :: [PlayingCard] -> Maybe PokerHand
- mkStraightFlush :: [PlayingCard] -> Maybe PokerHand
- mkFourOfAKind :: [PlayingCard] -> Maybe PokerHand
- mkFullHouse :: [PlayingCard] -> Maybe PokerHand
- mkFlush :: [PlayingCard] -> Maybe PokerHand
- mkStraight :: [PlayingCard] -> Maybe PokerHand
- mkThreeOfAKind :: [PlayingCard] -> Maybe PokerHand
- mkTwoPair :: [PlayingCard] -> Maybe PokerHand
- mkPair :: [PlayingCard] -> Maybe PokerHand
- mkHighCard :: [PlayingCard] -> Maybe PokerHand
- randomHighCard :: RandomGen g => Rand g PokerHand
- randomPair :: RandomGen g => Rand g PokerHand
- randomTwoPair :: RandomGen g => Rand g PokerHand
- randomThreeOfAKind :: RandomGen g => Rand g PokerHand
- randomStraight :: RandomGen g => Rand g PokerHand
- randomFlush :: RandomGen g => Rand g PokerHand
- randomFullHouse :: RandomGen g => Rand g PokerHand
- randomFourOfAKind :: RandomGen g => Rand g PokerHand
- randomStraightFlush :: RandomGen g => Rand g PokerHand
- randomRoyalFlush :: RandomGen g => Rand g PokerHand
- mkConsecutiveRanks :: [PlayingCard] -> Maybe ([PlayingCard], AceRank)
Documentation
Indicates if a poker hand uses the Ace as a high card or a low card.
>>>
data PokerHandType Source #
cardsOfPokerHand :: PokerHand -> [PlayingCard] Source #
allPossibleHands :: [[PlayingCard]] Source #
allRoyalFlush :: [[PlayingCard]] Source #
allStraightFlush :: [[PlayingCard]] Source #
allFourOfAKind :: [[PlayingCard]] Source #
allFullHouse :: [[PlayingCard]] Source #
allFlush :: [[PlayingCard]] Source #
allStraight :: [[PlayingCard]] Source #
allThreeOfAKind :: [[PlayingCard]] Source #
allTwoPair :: [[PlayingCard]] Source #
allPair :: [[PlayingCard]] Source #
allHighCard :: [[PlayingCard]] Source #
isRoyalFlush :: [PlayingCard] -> Bool Source #
isStraightFlush :: [PlayingCard] -> Bool Source #
isFourOfAKind :: [PlayingCard] -> Bool Source #
isFullHouse :: [PlayingCard] -> Bool Source #
isFlush :: [PlayingCard] -> Bool Source #
isStraight :: [PlayingCard] -> Bool Source #
isThreeOfAKind :: [PlayingCard] -> Bool Source #
isTwoPair :: [PlayingCard] -> Bool Source #
isPair :: [PlayingCard] -> Bool Source #
isHighCard :: [PlayingCard] -> Bool Source #
mkRoyalFlush :: [PlayingCard] -> Maybe PokerHand Source #
mkStraightFlush :: [PlayingCard] -> Maybe PokerHand Source #
mkFourOfAKind :: [PlayingCard] -> Maybe PokerHand Source #
mkFullHouse :: [PlayingCard] -> Maybe PokerHand Source #
mkStraight :: [PlayingCard] -> Maybe PokerHand Source #
mkThreeOfAKind :: [PlayingCard] -> Maybe PokerHand Source #
mkHighCard :: [PlayingCard] -> Maybe PokerHand Source #
mkConsecutiveRanks :: [PlayingCard] -> Maybe ([PlayingCard], AceRank) Source #