A      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKL M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v wxyz{|}~  Safe-InferredwA 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'.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 Safe-Inferred     Safe-Inferred(Calculates the score of one played word.hThe first list contains squares that are already on the board (and thus are not subject to bonuses).9The second list contains squares that are newly occupied.The bonus operations that should be applied to the score of a word once it has been calculated. When using to calculate score, double and triple word bonuses should be applied last.'Base value of a square, without bonuses       Safe-Inferred#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. Returns true if the player cannot place any of the given tiles. A player cannot play a Blank tile that they have not given a letter, or a tile not on their rack. !"#$ !"#$!#" $ !"#$ Safe-Inferred%&%&%&%& Safe-Inferred*4The position above the given position, if it exists.+4The position below the given position, if it exists.,=The position to the left of the given position, if it exists.->The position to the right of the given position, if it exists..The position of the star square '()*+,-./01 %'()*+,-./01 %)*+,-/01.'( '()*+,-./01 Safe-Inferred4?The caller allowed a move to be made when the game is finished.5QThe caller allowed the player to attempt to exchange tiles that they do not have.6ZThe caller allowed the player to attempt to exchange when no letters were left in the bag.7WThe caller allowed the client to place tiles on the board which were not in their rack.8UThe tiles the player placed formed one or more words which are not in the dictionary.9?A blank tile must be labeled with a letter before being placed.:]The client allowed the player to place tiles on a square that is already occupied with tiles.;4The first move on the board does not cover the star.<HThe client put the player in the situation to be able to place no tiles.=dThe tiles the player placed do not connect with any word (applies after the first move on the board)>VThe player has made an illegal tile placement. Tiles placed must form a line of tiles.??A letter bag with insufficient tiles was used to create a game.@<The dictionary file could not be parsed as it was malformed.A0The path given to a dictionary file was invalid.B9The letter bag file is marformed, so could not be parsed.CYThe caller has supplied an invalid path to a letter bag file, or the file is not openable23456789:;<=>?@ABC23456789:;<=>?@ABC2CBA@?>=<;:98765432CBA@?>=<;:9876543NoneDCreates a letter bag from a file where each line contains a space delimited letter character, letter value, and letter distribution. A blank letter is represented by a '_'/ character and has a disribution, but no value.@If successful, the letter bag is shuffled before it is returned.EjCreates a letter bag from a list of tiles. The order of the tiles is retained in the resulting letter bag.This function is effectful as it is necessary to create a stdGen for list to allow it to be shuffled using this generator in the future.FTakes n% numbers from a letter bag, yielding 5 if there is not enough tiles left in the bag or a W tuple where the left value is the taken tiles, and the right value is the new bag.GExchanges given tiles for the same number of tiles from the bag. The exchanged letters are added to the bag, the bag is then shuffled, and then the same number of tiles as exchanged are drawn from the bag.Returns a if there are not enough letters in the bag to exchange the given tiles for. Otherwise returns < with a tuple with the tiles given, and the new letterbag.HShuffles the contents of a letter bag. The bag is shuffled using the random generator which was created while constructing the bag. This function should not be used when creating an additional game with a new letter bag as the same seed value will be shared across games (meaning tiles will come out of the bag in the same order.) When constructing an additional game, use shuffleWithNewGenerator.I)Creates a letter bag using a list of tiles, and a generator which should be used when shuffling the bag. This function allows a game to be stepped through from the beginning where the moves and original generator were recorded, with any shuffling yielding the same bag as in the original game.J5Get the letter bag's current generator, which will be used to shuffle the contents of the bag in the next exchange or shuffle. If taken at the start of the game, with the original list of tiles in the bag in order, the game moves may be replayed in order with the original results of any shuffle retained.KShuffles a letter bag using a new random generator. This function should be used when spawning a new game using a letter bag with all the tiles remaining so that letter bags are unique between game instances. DEFGHIJK  DEFGHIJK  DFGH EIJK DEFGHIJK NoneMkReturns the list of words which are not present in the given dictionary from a list of input words. PjCreates a dictionary from a file containing a list of valid words, each word being seperated by a newline.LMNOPLMNOPLNPMOLMNOP  Safe-InferredQRQRQRQR  Safe-Inferred SAReturns all the squares on the board, ordered by column then row.TiPlaces a tile on a square and yields the new board, if the target square is empty. Otherwise yields .UbReturns the square at a given position if it is not occupied by a tile. Otherwise returns Nothing.V^Returns the square at a given position if it is occupied by a tile. Otherwise returns Nothing.WIAll letters immediately above a given square until a non-occupied square XIAll letters immediately below a given square until a non-occupied square YKAll letters immediately left of a given square until a non-occupied square ZLAll letters immediately right of a given square until a non-occupied square [Creates an empty board. STUVWXYZ[ QSTUVWXYZ[ QS[TVWXYZU STUVWXYZ[None\]^_`abcdefghijklmnopq\]^_`abcdefghijklmnopq \ ]^_`abcdefghikjlmnqpo NonerStarts 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.RTakes a letter bag and dictionary, which should be localised to the same language.KYields a tuple with the first player and the initial game state. Returns a R if there are not enough tiles in the letter bag to distribute to the players.v0Returns a history of the moves made in the game.rstuv\]^_`abcdefghijklmrstuv#\]^_`abcdefgh]^_c`abdertikjgsfuhlmvrstuv Safe-InferredyReturns the word formed by the first move on the board. The word must cover the star tile, and be linear. Any blank tiles must be labeled.zReturns the words formed by the tiles played on the board. A played word must be connected to a tile already on the board (or intersect tiles on the board), and be formed linearly. Any blank tiles must be labeled.{~Returns the main word formed by the played tiles. The main word is the linear stretch of tiles formed by the tiles placed.|GReturns the list of words which were adjacent to the main word formed. }ZReturns the list of positions mapped to the squares that the player placed their tiles on.~Scores the words formed by the tiles placed. The first item in the tuple is the overall score, while the second item is the list of scores for all the words formed.qReturns true if the player placed all 7 of their letters while forming these words, incurring a + 50 score bonus.0Returns the words formed by the play as strings.wxyz{|}~ wxyz{|}~ xwzy~{|}wxyz{|}~ NoneThe game has finished. The final game state, and the final words formed (if the game was ended by a player placing their final tiles.) The players before their scores were increased or decreased is also given.MThe new game state with the opportunity to play passed on to the next player.^The new game state, and the player with their rack before and after the exchange respectively.kThe new player (with their updated letter rack and score), new game state, and the words formed by the move7Transitiions the game to the next state. If the move places tiles, the player must have the tiles to place and place the tiles legally. If the move exchanges tiles, the bag must not be empty and the player must have the tiles to exchange. A ScrabbleError is returned if these condtions are not the case.Restores a game from a list of moves. The game must be set up in the way the original game was set up (including the letter bag constructed with the same tiles and random generator, dictionary and the list of players in the original order.)#If the game is not set up as it was originally, this function will return a scrabble error with the move which was invalid with the given state. For example, if the original players are not ordered in the correct way then the player will not have the required tiles to make the move._Maps each move to a resulting game transition, if the move is legal. Has the same semantics as  but returns a list of  so that laziness can be maintained, meaning all the game transitions dont have to be buffered before they can be consumed.  nopq nqpo !"#$%&'()*+,-./01234456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXY Z [ \ ] ^ _ _ ` a b c d e f g hijklmnopqrstuvwxyyz{|} ~        %) Z i  haskellscrabble-0.1.0.0Wordify.Rules.Tile Wordify.Rules.LetterBag.InternalWordify.Rules.SquareWordify.Rules.PlayerWordify.Rules.Pos.InternalWordify.Rules.PosWordify.Rules.ScrabbleErrorWordify.Rules.LetterBagWordify.Rules.DictionaryWordify.Rules.Board.InternalWordify.Rules.BoardWordify.Rules.GameWordify.Rules.MoveWordify.Rules.FormedWordWordify.Rules.Game.InternalTileBlankLetter tileValue tileLetter isPlayable LetterBagtilesbagSize generatorSquare TripleWord DoubleWord TripleLetter DoubleLetterNormal putTileOn scoreWordsquareIfOccupiedtileIfOccupied isOccupiedPlayernamerackscore LetterRack makePlayer tilesOnRack increaseScore reduceScore hasEmptyRack tileValues giveTiles removeTilesremovePlayedTilesexchangePosposMinposMaxposAtabovebelowleftrightstarPosxPosyPos gridValue ScrabbleError MiscErrorGameNotInProgressPlayerCannotExchange CannotExchangeWhenNoLettersInBagPlayerCannotPlaceWordsNotInDictionaryCannotPlaceBlankWithoutLetterPlacedTileOnOccupiedSquareDoesNotCoverTheStarTile NoTilesPlacedDoesNotConnectWithWordMisplacedLetterNotEnoughLettersInStartingBagMalformedDictionaryFileDictionaryFileNotFoundMalformedLetterBagFileLetterBagFileNotOpenablemakeBag bagFromTiles takeLettersexchangeLetters shuffleBagmakeBagUsingGenerator getGeneratorshuffleWithNewGenerator Dictionary invalidWords isValidWorddictionaryFromWordsmakeDictionaryBoard allSquares placeTileunoccupiedSquareAtoccupiedSquareAt lettersAbove lettersBelow lettersLeft lettersRight emptyBoardGameplayer1player2optionalPlayersboardbag dictionary currentPlayer playerNumber moveNumberpasses gameStatushistory GameStatusFinished InProgressHistoryMovePassExchange PlaceTilesmakeGameplayers getGameStatusnumberOfPlayers movesMade FormedWord FormedWordswordFormedFirstMovewordsFormedMidGamemainWord adjacentWords playerPlacedwordsWithScoresbingoBonusApplied wordStringsGameTransition GameFinishedPassTransitionExchangeTransitionMoveTransitionmakeMove restoreGamerestoreGameLazynewGame $fEqLetterBagapplyWordBonus baseValue isWordBonusplayerCanPlaceNameScoreplayerCanExchangetileFrequenciesposMap$fShowScrabbleErrorbase Data.MaybeNothingJustparseBagStringparseBag insertSquaresquareAtwalkFrom updateGameupdateCurrentPlayer nextPlayerpass updateHistory Data.EitherLeftinitialisePlayersoptionalsToPlayers DirectionVertical Horizontalmain otherWordsplaced FirstWord bingoBonus makeString placedSquares wordsFormedEither makeBoardMove exchangeMovepassMoveaddMoveToHistory finaliseGameupdatePlayerRackAndBagnewBoardremoveLettersandGiveScorescoresIfWordsLegal