Safe Haskell | Safe |
---|---|
Language | Haskell98 |
- type CardSet a = [(a, Int)]
- data Card
- charFromCard :: Card -> Char
- removeEach :: StateT (CardSet a) [] a
- normalizeSet :: CardSet a -> CardSet a
- allPossibilities :: CardSet a -> [[a]]
- allPossibilitiesSmall :: [[Card]]
- allPossibilitiesMedium :: [[Card]]
- allPossibilitiesSkat :: [[Card]]
- adjacentCouple :: [Card] -> Bool
- adjacentCouplesSmall :: [[Card]]
- exampleOutput :: IO ()
- sample :: (a -> b) -> [a] -> [(a, b)]
- data CardCount i = CardCount {
- otherCount, queenCount, kingCount :: i
- possibilitiesCardsNaive :: CardCount Int -> Integer
- possibilitiesCardsDynamic :: CardCount Int -> Array (CardCount Int) Integer
- sumCard :: Num i => CardCount i -> i
- possibilitiesCardsBorderNaive :: CardCount Int -> CardCount Integer
- possibilitiesCardsBorderDynamic :: CardCount Int -> Array (CardCount Int) (CardCount Integer)
- possibilitiesCardsBorder2Dynamic :: CardCount Int -> Array (CardCount Int) (CardCount Integer)
- testCardsBorderDynamic :: (CardCount Integer, CardCount Integer, CardCount Integer)
- numberOfAllPossibilities :: CardCount Int -> Integer
- cardSetSizeSkat :: CardCount Int
- numberOfPossibilitiesSkat :: Integer
- probabilitySkat :: Double
- cardSetSizeRummy :: CardCount Int
- numberOfPossibilitiesRummy :: Integer
- probabilityRummy :: Double
- cardSetSizeRummyJK :: CardCount Int
- numberOfPossibilitiesRummyJK :: Integer
- probabilityRummyJK :: Double
Documentation
charFromCard :: Card -> Char Source #
removeEach :: StateT (CardSet a) [] a Source #
normalizeSet :: CardSet a -> CardSet a Source #
allPossibilities :: CardSet a -> [[a]] Source #
allPossibilitiesSmall :: [[Card]] Source #
allPossibilitiesMedium :: [[Card]] Source #
allPossibilitiesSkat :: [[Card]] Source #
adjacentCouple :: [Card] -> Bool Source #
adjacentCouplesSmall :: [[Card]] Source #
exampleOutput :: IO () Source #
CardCount | |
|
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 #
cardSetSizeRummyJK :: CardCount Int Source #
Allow both Jack and King adjacent to Queen.