Safe Haskell | Safe |
---|---|
Language | Haskell98 |
- data Game
- newGame :: IO Game
- considerSet :: Card -> Card -> Card -> Game -> Maybe Game
- extraCards :: Game -> Either Int Game
- sortTableau :: (Card -> Card -> Ordering) -> Game -> Game
- tableau :: Game -> [Card]
- deckNull :: Game -> Bool
- deckSize :: Game -> Int
- emptyGame :: Game -> Bool
- hint :: RandomGen g => g -> Game -> (Maybe Card, g)
Types
Game
represents the current state of a Set game including the remaining
shuffled deck and the current tableau.
Game
creation functions
Game
update functions
considerSet :: Card -> Card -> Card -> Game -> Maybe Game Source
considerSet
verifies that a given set exists in the tableau
and then removes the set from the tableau.
extraCards :: Game -> Either Int Game Source
extraCards
returns either a new game with 3 additional cards dealt
or the number of sets remaining in the tableau.
sortTableau :: (Card -> Card -> Ordering) -> Game -> Game Source
sortTableau
sorts the tableau with a given order.