License | BSD-3-Clause |
---|---|
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- data PCell e = Cell {
- cellTerrain :: TerrainType
- cellEntity :: Erasable e
- cellRobots :: [IndexedTRobot]
- type Cell = PCell Entity
- data AugmentedCell e = AugmentedCell {}
- 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.
Cell | |
|
Instances
ToJSON Cell Source # | |
Defined in Swarm.Game.Scenario.Topography.Cell | |
ToJSON CellPaintDisplay Source # | |
Defined in Swarm.Game.Scenario.Topography.Cell toJSON :: CellPaintDisplay -> Value # toEncoding :: CellPaintDisplay -> Encoding # toJSONList :: [CellPaintDisplay] -> Value # toEncodingList :: [CellPaintDisplay] -> Encoding # | |
Show e => Show (PCell e) Source # | |
Eq e => Eq (PCell e) Source # | |
FromJSONE (EntityMap, RobotMap) Cell Source # | |
FromJSONE (EntityMap, RobotMap) (NamedStructure (Maybe (PCell Entity))) Source # | |
Defined in Swarm.Game.Scenario.Topography.Structure | |
FromJSONE (EntityMap, RobotMap) (PStructure (Maybe (PCell Entity))) Source # | |
Defined in Swarm.Game.Scenario.Topography.Structure | |
FromJSONE (WorldMap, InheritedStructureDefs, EntityMap, RobotMap) WorldDescription Source # | |
type Cell = PCell Entity Source #
A single cell in a world map, which contains a terrain value, and optionally an entity and robot.
data AugmentedCell e Source #
Supplements a cell with waypoint information
Instances
Show e => Show (AugmentedCell e) Source # | |
Defined in Swarm.Game.Scenario.Topography.Cell showsPrec :: Int -> AugmentedCell e -> ShowS # show :: AugmentedCell e -> String # showList :: [AugmentedCell e] -> ShowS # | |
Eq e => Eq (AugmentedCell e) Source # | |
Defined in Swarm.Game.Scenario.Topography.Cell (==) :: AugmentedCell e -> AugmentedCell e -> Bool # (/=) :: AugmentedCell e -> AugmentedCell e -> Bool # | |
FromJSONE (EntityMap, RobotMap) (AugmentedCell Entity) Source # | Parse a tuple such as |
Defined in Swarm.Game.Scenario.Topography.Cell parseJSONE :: Value -> ParserE (EntityMap, RobotMap) (AugmentedCell Entity) Source # parseJSONE' :: (EntityMap, RobotMap) -> Value -> Parser (AugmentedCell Entity) Source # |
type CellPaintDisplay = PCell EntityFacade Source #
Stateless cells used for the World Editor. These cells contain the bare minimum display information for rendering.