haskellscrabble-2.0.0: A scrabble library capturing the core game logic of scrabble.

Safe HaskellSafe
LanguageHaskell98

Wordify.Rules.Tile

Synopsis

Documentation

data Tile Source

A tile is a letter with a value, or a Blank tile which may have been given a letter. Blank tiles always have the value '0'.

Constructors

Letter Char Int 
Blank (Maybe Char) 

isPlayable :: Tile -> Tile -> Bool Source

isPlayble, applied to a played tile and compared against a tile returns true if a player returned a letter tile on their rack, or if the player played a Blank that has been given a letter

printLetter :: Tile -> Maybe Char Source

Prints a letter in the style found on a scoresheet. E.g. blank letters are printed in lowercase.