swarm-0.4: 2D resource gathering game with programmable robots
Safe HaskellSafe-Inferred
LanguageHaskell2010

Swarm.Game.Scenario.Topography.Area

Synopsis

Documentation

upperLeftToBottomRight :: AreaDimensions -> Location -> Location Source #

Incorporates an offset by -1, since the area is "inclusive" of the lower-right coordinate. Inverse of "cornersToArea".

cornersToArea :: Location -> Location -> AreaDimensions Source #

Converts the displacement vector between the two diagonal corners of the rectangle into an AreaDimensions record. Adds one to both dimensions since the corner coordinates are "inclusive". Inverse of "upperLeftToBottomRight".