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

Swarm.Game.Step.Const

Description

Implementation of robot commands

Synopsis

Documentation

data RobotFailure Source #

How to handle failure, for example when moving to blocked location

Constructors

ThrowExn 
Destroy 
IgnoreFail 

type MoveFailureHandler = MoveFailureMode -> RobotFailure Source #

How to handle different types of failure when moving/teleporting to a location.

data GrabRemoval Source #

Whether to remove the entity in the world inside the doGrab function or leave it to be done by other code.

Instances

Instances details
Eq GrabRemoval Source # 
Instance details

Defined in Swarm.Game.Step.Const

execConst Source #

Arguments

:: (HasRobotStepState sig m, Has Time sig m, Has (Lift IO) sig m) 
=> (Store -> Robot -> Value -> m Value)

Need to pass this function as an argument to avoid module import cycle The supplied function invokes runCESK, which lives in Swarm.Game.Step.

-> Const 
-> [Value] 
-> Store 
-> Cont 
-> m CESK 

Interpret the execution (or evaluation) of a constant application to some values.