swarm-0.3.0.1: 2D resource gathering game with programmable robots
Safe HaskellSafe-Inferred
LanguageHaskell2010

Swarm.Game.Scenario.Cell

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
Show e => Show (PCell e) Source # 
Instance details

Defined in Swarm.Game.Scenario.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.Cell

Methods

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

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

FromJSONE (EntityMap, RobotMap) Cell 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.Cell

type Cell = PCell Entity Source #

A single cell in a world map, which contains a terrain value, and optionally an entity and robot.