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

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

Show Area Source # 

Methods

showsPrec :: Int -> Area -> ShowS #

show :: Area -> String #

showList :: [Area] -> ShowS #

Binary Area Source # 

Methods

put :: Area -> Put #

get :: Get Area #

putList :: [Area] -> Put #

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.