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

Safe HaskellNone




makeGame :: (Player, Player, Maybe (Player, Maybe Player)) -> LetterBag -> Dictionary -> Either ScrabbleError Game Source

Starts a new game.

A game has at least 2 players, and 2 optional players (player 3 and 4.) The players should be newly created, as tiles from the letter bag will be distributed to each player.

Takes a letter bag and dictionary, which should be localised to the same language.

Yields a tuple with the first player and the initial game state. Returns a Left if there are not enough tiles in the letter bag to distribute to the players.

data History Source


History LetterBag (Seq Move) 


movesMade :: Game -> [Move] Source

Returns a history of the moves made in the game.