LambdaHack-0.4.99.0: A game engine library for roguelike dungeon crawlers

Safe HaskellNone

Game.LambdaHack.Client.BfsClient

Description

Breadth first search and realted algorithms using the client monad.

Synopsis

Documentation

getCacheBfsAndPath :: forall m. MonadClient m => ActorId -> Point -> m (Array BfsDistance, Maybe [Point])Source

Get cached BFS data and path or, if not stored, generate, store and return. Due to laziness, they are not calculated until needed.

closestUnknown :: MonadClient m => ActorId -> m (Maybe Point)Source

Closest reachable unknown tile position, if any.

closestSuspect :: MonadClient m => ActorId -> m [Point]Source

Closest (wrt paths) suspect tile.

closestSmell :: MonadClient m => ActorId -> m [(Int, (Point, SmellTime))]Source

Finds smells closest to the actor, except under the actor.

furthestKnown :: MonadClient m => ActorId -> m PointSource

Furthest (wrt paths) known position.

closestTriggers :: MonadClient m => Maybe Bool -> Bool -> ActorId -> m [Point]Source

Closest (wrt paths) triggerable open tiles. The second argument can ever be true only if there's no escape from the dungeon.

closestItems :: MonadClient m => ActorId -> m [(Int, (Point, Maybe ItemBag))]Source

Closest (wrt paths) items and changeable tiles (e.g., item caches).

closestFoes :: MonadClient m => [(ActorId, Actor)] -> ActorId -> m [(Int, (ActorId, Actor))]Source

Closest (wrt paths) enemy actors.