Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
- data Square
- = Normal (Maybe Tile)
- | DoubleLetter (Maybe Tile)
- | TripleLetter (Maybe Tile)
- | DoubleWord (Maybe Tile)
- | TripleWord (Maybe Tile)
- isOccupied :: Square -> Bool
- scoreWord :: Seq Square -> Seq Square -> Int
- squareIfOccupied :: Square -> Maybe Square
- putTileOn :: Square -> Tile -> Square
- tileIfOccupied :: Square -> Maybe Tile
Documentation
Normal (Maybe Tile) | |
DoubleLetter (Maybe Tile) | |
TripleLetter (Maybe Tile) | |
DoubleWord (Maybe Tile) | |
TripleWord (Maybe Tile) |
isOccupied :: Square -> Bool Source
scoreWord :: Seq Square -> Seq Square -> Int Source
Calculates the score of one played word.
The first list contains squares that are already on the board (and thus are not subject to bonuses).
The second list contains squares that are newly occupied.
squareIfOccupied :: Square -> Maybe Square Source
tileIfOccupied :: Square -> Maybe Tile Source