Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Puzzle grids.
Synopsis
- type Grid k a = Map k a
- type AreaGrid = Grid C Char
- type ShadedGrid = Grid C Bool
- nodes :: Grid N a -> Set N
- size :: Grid Coord a -> Size
- sizeGrid :: (Ord k, FromCoord k) => Size -> Grid k ()
- clues :: Grid k (Maybe a) -> Grid k a
- nodeGrid :: Grid C a -> Grid N ()
- cellGrid :: Grid N a -> Grid C ()
- dominoGrid :: DigitRange -> Grid C (Int, Int)
- litsGrid :: Grid C (Maybe Char)
- litsoGrid :: Grid C (Maybe Char)
- pentominoGrid :: Grid C (Maybe Char)
- borders :: Eq a => Grid C a -> [Edge N]
- skeletons :: Eq a => Grid C a -> [Edge C]
- edgesGen :: Dual' k => (a -> a -> Bool) -> (a -> Bool) -> Map k a -> [Edge (Dual k)]
- colour :: Eq a => Grid C a -> Grid C Int
- collectLines :: (Key k, Eq a) => Grid k (Maybe a) -> [Edge k]
- rows :: Map C a -> [[a]]
- data OutsideClues k a = OC {}
- outsideSize :: OutsideClues k a -> Size
- outsideClues :: (Ord k, FromCoord k) => OutsideClues k a -> Map k a
- multiOutsideClues :: (Ord k, FromCoord k) => OutsideClues k [a] -> Map k a
- outsideGrid :: (Ord k, FromCoord k) => OutsideClues k a -> Grid k ()
- outsideValues :: OutsideClues k a -> [a]
Documentation
sizeGrid :: (Ord k, FromCoord k) => Size -> Grid k () Source #
Create a dummy grid of the given size.
clues :: Grid k (Maybe a) -> Grid k a Source #
For a grid with value type Maybe a
, return an association
list of cells and Just
values.
nodeGrid :: Grid C a -> Grid N () Source #
A grid of empty nodes with all nodes of the cells of the first grid.
dominoGrid :: DigitRange -> Grid C (Int, Int) Source #
borders :: Eq a => Grid C a -> [Edge N] Source #
The inner edges of a grid that separate unequal cells.
data OutsideClues k a Source #
Clues along the outside of a square grid. Ordered such that coordinates increase.
Instances
Functor (OutsideClues k) Source # | |
Defined in Data.Grid fmap :: (a -> b) -> OutsideClues k a -> OutsideClues k b # (<$) :: a -> OutsideClues k b -> OutsideClues k a # | |
Eq a => Eq (OutsideClues k a) Source # | |
Defined in Data.Grid (==) :: OutsideClues k a -> OutsideClues k a -> Bool # (/=) :: OutsideClues k a -> OutsideClues k a -> Bool # | |
Show a => Show (OutsideClues k a) Source # | |
Defined in Data.Grid showsPrec :: Int -> OutsideClues k a -> ShowS # show :: OutsideClues k a -> String # showList :: [OutsideClues k a] -> ShowS # |
outsideSize :: OutsideClues k a -> Size Source #
outsideClues :: (Ord k, FromCoord k) => OutsideClues k a -> Map k a Source #
multiOutsideClues :: (Ord k, FromCoord k) => OutsideClues k [a] -> Map k a Source #
outsideGrid :: (Ord k, FromCoord k) => OutsideClues k a -> Grid k () Source #
Create a dummy grid matching the given outside clues in size.
outsideValues :: OutsideClues k a -> [a] Source #