| License | BSD-3-Clause |
|---|---|
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Swarm.Game.Scenario.Topography.Cell
Description
Synopsis
- data PCell e = Cell {
- cellTerrain :: TerrainType
- cellEntity :: Erasable e
- cellRobots :: [IndexedTRobot]
- type Cell = PCell Entity
- type AugmentedCell e = SignpostableCell (PCell e)
- type CellPaintDisplay = PCell EntityFacade
Documentation
A single cell in a world map, which contains a terrain value,
and optionally an entity and robot.
It is parameterized on the Entity type to facilitate less
stateful versions of the Entity type in rendering scenario data.
Constructors
| Cell | |
Fields
| |
Instances
| ToJSON Cell Source # | |
| ToJSON CellPaintDisplay Source # | |
Defined in Swarm.Game.Scenario.Topography.Cell Methods toJSON :: CellPaintDisplay -> Value # toEncoding :: CellPaintDisplay -> Encoding # toJSONList :: [CellPaintDisplay] -> Value # toEncodingList :: [CellPaintDisplay] -> Encoding # omitField :: CellPaintDisplay -> Bool # | |
| Show e => Show (PCell e) Source # | |
| Eq e => Eq (PCell e) Source # | |
| FromJSONE (TerrainEntityMaps, RobotMap) Cell Source # | Parse a tuple such as |
Defined in Swarm.Game.Scenario.Topography.Cell Methods parseJSONE :: Value -> ParserE (TerrainEntityMaps, RobotMap) Cell parseJSONE' :: (TerrainEntityMaps, RobotMap) -> Value -> Parser Cell | |
type Cell = PCell Entity Source #
A single cell in a world map, which contains a terrain value, and optionally an entity and robot.
type AugmentedCell e = SignpostableCell (PCell e) Source #
Supplements a cell with waypoint information
type CellPaintDisplay = PCell EntityFacade Source #
Stateless cells used for the World Editor. These cells contain the bare minimum display information for rendering.