Safe Haskell | Safe |
---|---|
Language | Haskell98 |
- 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 | |
|
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 #