LambdaHack-0.9.3.0: A game engine library for tactical squad ASCII roguelike dungeon crawlers

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Common.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
Eq Area Source # 
Instance details

Defined in Game.LambdaHack.Common.Area

Methods

(==) :: Area -> Area -> Bool #

(/=) :: Area -> Area -> Bool #

Show Area Source # 
Instance details

Defined in Game.LambdaHack.Common.Area

Methods

showsPrec :: Int -> Area -> ShowS #

show :: Area -> String #

showList :: [Area] -> ShowS #

Binary Area Source # 
Instance details

Defined in Game.LambdaHack.Common.Area

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 #

inside :: Point -> Area -> Bool Source #

Checks that a point belongs to an area.

shrink :: Area -> Maybe Area Source #

Shrink the given area on all fours sides by the amount.