LambdaHack-0.2.14: A roguelike game engine in early development

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Server.DungeonGen.Area

Description

Rectangular areas of levels and their basic operations.

Synopsis

Documentation

data Area Source

The type of areas. The bottom left and the top right points.

Instances

toArea :: (X, Y, X, Y) -> Maybe Area Source

Checks if it's an area with at least one field.

fromArea :: Area -> (X, Y, X, Y) Source

grid :: (X, Y) -> Area -> [(Point, Area)] Source

Divide uniformly a larger area into the given number of smaller areas overlapping at the edges.

shrink :: Area -> Maybe Area Source

Enlarge (or shrink) the given area on all fours sides by the amount.