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 Square
s -
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 String
s.
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.
stringCksum :: String -> IO CUShortSource