Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- data Player
- data LetterRack
- makePlayer :: String -> Player
- name :: Player -> Name
- rack :: Player -> LetterRack
- tilesOnRack :: Player -> [Tile]
- endBonus :: Player -> Int
- score :: Player -> Score
- increaseScore :: Player -> Int -> Player
- reduceScore :: Player -> Int -> Player
- giveEndLosePenalty :: Player -> Int -> Player
- giveEndWinBonus :: Player -> Int -> Player
- giveTiles :: Player -> [Tile] -> Player
- removePlayedTiles :: Player -> [Tile] -> Maybe Player
- removeTiles :: Player -> [Tile] -> Player
- hasEmptyRack :: Player -> Bool
- tileValues :: Player -> Int
- exchange :: Player -> [Tile] -> [Tile] -> Maybe Player
Documentation
data LetterRack Source #
Instances
Eq LetterRack Source # | |
Defined in Wordify.Rules.Player (==) :: LetterRack -> LetterRack -> Bool # (/=) :: LetterRack -> LetterRack -> Bool # | |
Show LetterRack Source # | |
Defined in Wordify.Rules.Player showsPrec :: Int -> LetterRack -> ShowS # show :: LetterRack -> String # showList :: [LetterRack] -> ShowS # |
makePlayer :: String -> Player Source #
rack :: Player -> LetterRack 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.
hasEmptyRack :: Player -> Bool Source #
tileValues :: Player -> Int Source #