wordify-0.1.0.0

Safe HaskellNone
LanguageHaskell2010

Wordify.Rules.Game

Synopsis

Documentation

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.

movesMade :: Game -> [Move] Source #

Returns a history of the moves made in the game.

data History Source #

Constructors

History LetterBag (Seq Move) 
Instances
Eq History Source # 
Instance details

Defined in Wordify.Rules.Game.Internal

Methods

(==) :: History -> History -> Bool #

(/=) :: History -> History -> Bool #

Show History Source # 
Instance details

Defined in Wordify.Rules.Game.Internal