License | BSD-3-Clause |
---|---|
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Swarm.Game.Scenario.Topography.EntityFacade
Description
Stand-in type for an Entity for purposes that do not require carrying around the entire state of an Entity.
Useful for simplified serialization, debugging, and equality checking, particularly for the World Editor.
Synopsis
- data EntityFacade = EntityFacade EntityName Display
- mkFacade :: Entity -> EntityFacade
Documentation
data EntityFacade Source #
This datatype is a lightweight stand-in for the full-fledged Entity type without the baggage of all of its other fields. It contains the bare minimum display information for rendering.
Constructors
EntityFacade EntityName Display |
Instances
ToJSON CellPaintDisplay Source # | |
Defined in Swarm.Game.Scenario.Topography.Cell Methods toJSON :: CellPaintDisplay -> Value # toEncoding :: CellPaintDisplay -> Encoding # toJSONList :: [CellPaintDisplay] -> Value # toEncodingList :: [CellPaintDisplay] -> Encoding # | |
ToJSON EntityFacade Source # | |
Defined in Swarm.Game.Scenario.Topography.EntityFacade Methods toJSON :: EntityFacade -> Value # toEncoding :: EntityFacade -> Encoding # toJSONList :: [EntityFacade] -> Value # toEncodingList :: [EntityFacade] -> Encoding # | |
ToJSON WorldDescriptionPaint Source # | |
Defined in Swarm.Game.Scenario.Topography.WorldDescription Methods toJSON :: WorldDescriptionPaint -> Value # toEncoding :: WorldDescriptionPaint -> Encoding # toJSONList :: [WorldDescriptionPaint] -> Value # toEncodingList :: [WorldDescriptionPaint] -> Encoding # | |
Eq EntityFacade Source # | |
Defined in Swarm.Game.Scenario.Topography.EntityFacade |
mkFacade :: Entity -> EntityFacade Source #