Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
- data Player
- data LetterRack
- name :: Player -> Name
- rack :: Player -> LetterRack
- score :: Player -> Score
- makePlayer :: String -> Player
- increaseScore :: Player -> Int -> Player
- giveTiles :: Player -> [Tile] -> Player
- tilesOnRack :: Player -> [Tile]
- removePlayedTiles :: Player -> [Tile] -> Maybe Player
- removeTiles :: Player -> [Tile] -> Player
- hasEmptyRack :: Player -> Bool
- tileValues :: Player -> Int
- reduceScore :: Player -> Int -> Player
- exchange :: Player -> [Tile] -> [Tile] -> Maybe Player
Documentation
rack :: Player -> LetterRack Source
makePlayer :: String -> Player Source
increaseScore :: Player -> Int -> Player Source
tilesOnRack :: Player -> [Tile] Source
removePlayedTiles :: Player -> [Tile] -> Maybe Player Source
Removes played tiles from the player's tile rack, if it was possible for the player to play those tiles in the first place. A player may play a tile on his rack, unless it is a blank, which must first be assigned a letter.
removeTiles :: Player -> [Tile] -> Player Source
hasEmptyRack :: Player -> Bool Source
tileValues :: Player -> Int Source
reduceScore :: Player -> Int -> Player Source