License | BSD-3-Clause |
---|---|
Safe Haskell | None |
Language | Haskell2010 |
Swarm.Game.Step.Path.Walkability
Description
Walkability logic
Synopsis
Documentation
data MoveFailureMode Source #
Constructors
PathBlockedBy (Maybe Entity) | Can't move due to something blocking the path. Note that if the robot has a path Whitelist, then the absence of an entity could block the path (represented by `PathBlockedBy Nothing`). |
PathLiquid Entity | Some liquid entity is in the path. |
checkUnwalkable :: WalkabilityContext -> Maybe Entity -> Maybe MoveFailureMode Source #
Pure logic used inside of
checkMoveFailureUnprivileged
. Given a
(possibly empty) walkable entity whitelist or blacklist, and the
entity (or lack thereof) in the cell we are trying to move to,
determine whether there is some kind of movement failure.