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

Swarm.Game.Scenario.Topography.WorldPalette

Description

 
Synopsis

Documentation

getUniqueTerrainFacadePairs :: [[CellPaintDisplay]] -> Map (TerrainWith EntityName) (TerrainWith EntityFacade) Source #

We want to identify all of the unique (terrain, entity facade) pairs. However, EntityFacade includes a Display record, which contains more fields than desirable for use as a unique key. Therefore, we extract just the entity name for use in a (terrain, entity name) key, and couple it with the original (terrain, entity facade) pair in a Map.

genericCharacterPool :: Set Char Source #

All alphanumeric characters. These are used as supplemental map placeholders in case a pre-existing display character is not available to re-use.

prepForJson :: WorldPalette EntityFacade -> [[CellPaintDisplay]] -> (Text, KeyMap CellPaintDisplay) Source #

Note that display characters are not unique across different entities! However, the palette KeyMap as a conveyance serves to dedupe them.