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

Safe HaskellSafe-Inferred
LanguageHaskell98

Wordify.Rules.ScrabbleError

Documentation

data ScrabbleError Source

Constructors

LetterBagFileNotOpenable String

The caller has supplied an invalid path to a letter bag file, or the file is not openable

MalformedLetterBagFile FilePath

The letter bag file is marformed, so could not be parsed.

DictionaryFileNotFound FilePath

The path given to a dictionary file was invalid.

MalformedDictionaryFile FilePath

The dictionary file could not be parsed as it was malformed.

NotEnoughLettersInStartingBag Int

A letter bag with insufficient tiles was used to create a game.

MisplacedLetter Pos

The player has made an illegal tile placement. Tiles placed must form a line of tiles.

DoesNotConnectWithWord

The tiles the player placed do not connect with any word (applies after the first move on the board)

NoTilesPlaced

The client put the player in the situation to be able to place no tiles.

DoesNotCoverTheStarTile

The first move on the board does not cover the star.

PlacedTileOnOccupiedSquare Pos Tile

The client allowed the player to place tiles on a square that is already occupied with tiles.

CannotPlaceBlankWithoutLetter Pos

A blank tile must be labeled with a letter before being placed.

WordsNotInDictionary [String]

The tiles the player placed formed one or more words which are not in the dictionary.

PlayerCannotPlace LetterRack [Tile]

The caller allowed the client to place tiles on the board which were not in their rack.

CannotExchangeWhenNoLettersInBag

The caller allowed the player to attempt to exchange when no letters were left in the bag.

PlayerCannotExchange LetterRack [Tile]

The caller allowed the player to attempt to exchange tiles that they do not have.

GameNotInProgress

The caller allowed a move to be made when the game is finished.

MiscError String