swarm-0.6.0.0: 2D resource gathering game with programmable robots
LicenseBSD-3-Clause
Safe HaskellSafe-Inferred
LanguageHaskell2010

Swarm.Util.Content

Contents

Description

Utilities for accessing content of the world, by single cells or in bulk for rendering.

Synopsis

Documentation

getContentAt :: TerrainMap -> MultiWorld Int e -> Cosmic Coords -> (TerrainType, Maybe e) Source #

Get the terrain and entity at a single cell

Rendering

getMapRectangle :: (d -> e) -> (Coords -> (TerrainType, Maybe d)) -> BoundsRectangle -> Grid (PCell e) Source #

Get a rectangle of cells for rendering.

Compare to: worldWidget