| Safe Haskell | None |
|---|
Codec.Game.Puz
- data Style
- data Square
- data Dir
- data Puzzle = Puzzle {}
- type Index = (Int, Int)
- numberGrid :: Array Index Square -> Array Index (Maybe Int)
- unlockPuz :: Puzzle -> CUShort -> IO (Either ErrMsg Puzzle)
- bruteForceUnlockPuz :: Puzzle -> IO (Either ErrMsg (Puzzle, Int))
- loadPuzzle :: String -> IO (Either Puzzle ErrMsg)
- savePuzzle :: String -> Puzzle -> IO (Maybe ErrMsg)
- stringCksum :: String -> IO CUShort
Documentation
The Style type enumerates the possible styles of fillable squares.
Currently, there are only two: plain squares and circled squares.
The Square type represents a square in a puzzle.
The Puzzle type represents a particular crossword. The
crossword's dimensions are specified by width and height.
The contents of the puzzle are given by two arrays of Squares -
grid and solution. The board arrays are in row-major order
and are numbered from (0,0) to (width-1,height-1). The grid
board represents the current state of play, and as such its
squares may be partially or entirely filled in, correctly or
incorrectly. The solution board should have the same basic
layout as the grid board (in terms of black vs letter squares),
and should be entirely filled in.
Various other pieces of data about the puzzle are given bu
title, author, notes and copyright, all Strings.
There is an optional timer, which is a number of seconds elapsed and a bool that is true if the timer is stopped and false otherwise.
The field clues gives the puzzle's clues. The numbers in this
array correspond to the numbering that would appear on the grid.
To reconstruct this information, see the numberGrid function.
Constructors
| Puzzle | |
stringCksum :: String -> IO CUShortSource