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

Swarm.Game.Scenario.Topography.Cell

Description

 
Synopsis

Documentation

data PCell e Source #

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.

Instances

Instances details
ToJSON Cell Source # 
Instance details

Defined in Swarm.Game.Scenario.Topography.Cell

ToJSON CellPaintDisplay Source # 
Instance details

Defined in Swarm.Game.Scenario.Topography.Cell

Show e => Show (PCell e) Source # 
Instance details

Defined in Swarm.Game.Scenario.Topography.Cell

Methods

showsPrec :: Int -> PCell e -> ShowS #

show :: PCell e -> String #

showList :: [PCell e] -> ShowS #

Eq e => Eq (PCell e) Source # 
Instance details

Defined in Swarm.Game.Scenario.Topography.Cell

Methods

(==) :: PCell e -> PCell e -> Bool #

(/=) :: PCell e -> PCell e -> Bool #

FromJSONE (EntityMap, RobotMap) Cell Source # 
Instance details

Defined in Swarm.Game.Scenario.Topography.Cell

FromJSONE (EntityMap, RobotMap) (NamedStructure (Maybe (PCell Entity))) Source # 
Instance details

Defined in Swarm.Game.Scenario.Topography.Structure

FromJSONE (EntityMap, RobotMap) (PStructure (Maybe (PCell Entity))) Source # 
Instance details

Defined in Swarm.Game.Scenario.Topography.Structure

FromJSONE (WorldMap, InheritedStructureDefs, EntityMap, RobotMap) WorldDescription Source # 
Instance details

Defined in Swarm.Game.Scenario.Topography.WorldDescription

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

Instances details
Show e => Show (AugmentedCell e) Source # 
Instance details

Defined in Swarm.Game.Scenario.Topography.Cell

Eq e => Eq (AugmentedCell e) Source # 
Instance details

Defined in Swarm.Game.Scenario.Topography.Cell

FromJSONE (EntityMap, RobotMap) (AugmentedCell Entity) Source #

Parse a tuple such as [grass, rock, base] into a PCell. The entity and robot, if present, are immediately looked up and converted into Entity and TRobot values. If they are not found, a parse error results.

Instance details

Defined in Swarm.Game.Scenario.Topography.Cell

type CellPaintDisplay = PCell EntityFacade Source #

Stateless cells used for the World Editor. These cells contain the bare minimum display information for rendering.