hpuz-1.0.2: Haskell bindings for libpuz

Codec.Game.Puz

Synopsis

Documentation

data Style Source

The Style type enumerates the possible styles of fillable squares. Currently, there are only two: plain squares and circled squares.

Constructors

Plain 
Circle 

Instances

data Square Source

The Square type represents a square in a puzzle.

Constructors

Black

Black squares

Letter (Maybe Char) Style

Standard letter squares, optionally filled in

Rebus String Style

Rebus squares, optionally filled in

Instances

data Dir Source

Constructors

Across 
Down 

Instances

data Puzzle Source

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.

Instances

type Index = (Int, Int)Source