Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Synopsis
- data Card
- data CardCount i = CardCount {
- otherCount, queenCount, kingCount :: i
- charFromCard :: Card -> Char
- allPossibilities :: CardSet a -> [[a]]
- numberOfAllPossibilities :: CardCount Int -> Integer
- possibilitiesCardsNaive :: CardCount Int -> Integer
- possibilitiesCardsDynamic :: CardCount Int -> Array (CardCount Int) Integer
- possibilitiesCardsBorderNaive :: CardCount Int -> CardCount Integer
- possibilitiesCardsBorderDynamic :: CardCount Int -> Array (CardCount Int) (CardCount Integer)
- possibilitiesCardsBorder2Dynamic :: CardCount Int -> Array (CardCount Int) (CardCount Integer)
- cardSetSizeSkat :: CardCount Int
- numberOfPossibilitiesSkat :: Integer
- probabilitySkat :: Double
- cardSetSizeRummy :: CardCount Int
- numberOfPossibilitiesRummy :: Integer
- probabilityRummy :: Double
- cardSetSizeRummyJK :: CardCount Int
- numberOfPossibilitiesRummyJK :: Integer
- probabilityRummyJK :: Double
- testCardsBorderDynamic :: (CardCount Integer, CardCount Integer, CardCount Integer)
- exampleOutput :: IO ()
- adjacentCouplesSmall :: [[Card]]
- allPossibilitiesSmall :: [[Card]]
- allPossibilitiesMedium :: [[Card]]
- allPossibilitiesSkat :: [[Card]]
general
CardCount | |
|
Instances
Eq i => Eq (CardCount i) Source # | |
Ord i => Ord (CardCount i) Source # | |
Defined in Combinatorics.CardPairs | |
Show i => Show (CardCount i) Source # | |
Ix i => Ix (CardCount i) Source # | |
Defined in Combinatorics.CardPairs range :: (CardCount i, CardCount i) -> [CardCount i] # index :: (CardCount i, CardCount i) -> CardCount i -> Int # unsafeIndex :: (CardCount i, CardCount i) -> CardCount i -> Int inRange :: (CardCount i, CardCount i) -> CardCount i -> Bool # rangeSize :: (CardCount i, CardCount i) -> Int # unsafeRangeSize :: (CardCount i, CardCount i) -> Int |
charFromCard :: Card -> Char Source #
allPossibilities :: CardSet a -> [[a]] Source #
possibilitiesCardsBorderNaive :: CardCount Int -> CardCount Integer Source #
Count the number of card set orderings
with adjacent queen and king.
We return a triple where the elements count with respect to an additional condition:
(card set starts with an ordinary card ' ',
start with queen q
,
start with king k
)
possibilitiesCardsBorderDynamic :: CardCount Int -> Array (CardCount Int) (CardCount Integer) Source #
possibilitiesCardsBorder2Dynamic :: CardCount Int -> Array (CardCount Int) (CardCount Integer) Source #
examples
cardSetSizeRummyJK :: CardCount Int Source #
Allow both Jack and King adjacent to Queen.
tests
exampleOutput :: IO () Source #
adjacentCouplesSmall :: [[Card]] Source #
allPossibilitiesSmall :: [[Card]] Source #
allPossibilitiesMedium :: [[Card]] Source #
allPossibilitiesSkat :: [[Card]] Source #