swarm-0.7.0.0: 2D resource gathering game with programmable robots
LicenseBSD-3-Clause
Safe HaskellNone
LanguageHaskell2010

Swarm.Game.Terrain

Description

Terrain types and properties.

Synopsis

Documentation

data TerrainType Source #

Constructors

BlankT 
TerrainType Text 

Instances

Instances details
FromJSON TerrainType Source # 
Instance details

Defined in Swarm.Game.Terrain

ToJSON TerrainType Source # 
Instance details

Defined in Swarm.Game.Terrain

Monoid TerrainType Source # 
Instance details

Defined in Swarm.Game.Terrain

Semigroup TerrainType Source # 
Instance details

Defined in Swarm.Game.Terrain

Generic TerrainType Source # 
Instance details

Defined in Swarm.Game.Terrain

Associated Types

type Rep TerrainType 
Instance details

Defined in Swarm.Game.Terrain

type Rep TerrainType = D1 ('MetaData "TerrainType" "Swarm.Game.Terrain" "swarm-0.7.0.0-IuFfgHrMoE7JrptOBRVOwx-swarm-scenario" 'False) (C1 ('MetaCons "BlankT" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TerrainType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))
Show TerrainType Source # 
Instance details

Defined in Swarm.Game.Terrain

Eq TerrainType Source # 
Instance details

Defined in Swarm.Game.Terrain

Ord TerrainType Source # 
Instance details

Defined in Swarm.Game.Terrain

Hashable TerrainType Source # 
Instance details

Defined in Swarm.Game.Terrain

type Rep TerrainType Source # 
Instance details

Defined in Swarm.Game.Terrain

type Rep TerrainType = D1 ('MetaData "TerrainType" "Swarm.Game.Terrain" "swarm-0.7.0.0-IuFfgHrMoE7JrptOBRVOwx-swarm-scenario" 'False) (C1 ('MetaCons "BlankT" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TerrainType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))

data TerrainObj Source #

Instances

Instances details
Show TerrainObj Source # 
Instance details

Defined in Swarm.Game.Terrain

data TerrainMap Source #

Each terrain type shall have a unique integral index. The indices should be consecutive by parse order.

Constructors

TerrainMap 

Fields

loadTerrain :: forall (sig :: (Type -> Type) -> Type -> Type) m. (Has (Throw SystemFailure) sig m, Has (Lift IO) sig m) => m TerrainMap Source #

Load terrain from a data file called terrains.yaml, producing either an TerrainMap or a parse error.

validateTerrainAttrRefs :: forall (sig :: (Type -> Type) -> Type -> Type) m. Has (Throw LoadingFailure) sig m => Set WorldAttr -> [TerrainItem] -> m [TerrainObj] Source #

Validates references to Display attributes