LambdaHack-0.4.9.0: A game engine library for roguelike dungeon crawlers

Safe HaskellNone

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 AreaSource

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 AreaSource

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