Module

Sudoku.Types

Package
purescript-sudoku
Repository
sanrokugomaato/purescript-sudoku

The collection of types used in Sudoku.

#Cell Source

data Cell a

A type representing each cell on a Sudoku board. The first Int in the Cell constructor means an index of a cell. The type parameter a means content of a cell, which is usually Int for deterministic boards or Maybe Int for nondeterministic ones.

Constructors

Instances

#Row Source

newtype Row

A type representing a row.

Constructors

Instances

#Col Source

newtype Col

A type representing a column.

Constructors

Instances

#Board Source

newtype Board a

A type representing a board. It has a type parameter a meaning the content of its cells.

Constructors

Instances

#Section Source

data Section

A type representing a section. A section in Sudoku is a 3x3 area, 9 of which exist on a board, from Section 0 0 to Section 2 2.

Constructors

#Difficulty Source

type Difficulty = Int

A type alias for Int representing difficulty of a game. Specifically, it means the number of holes to fill in.

#Game Source

data Game

A type representing a Sudoku game. It contains its difficulty, question board and answer board. A game can usually be generated by generateGame.

Constructors

Instances