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

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Client.State

Description

Client-specific game state components.

Synopsis

Documentation

data StateClient Source #

Client state, belonging to a single faction.

Constructors

StateClient 

Fields

data BfsAndPath Source #

Pathfinding distances to all reachable positions of an actor and a shortest paths to some of the positions.

data TgtAndPath Source #

Actor's target and a path to it, if any.

Constructors

TgtAndPath 

Fields

Instances

Show TgtAndPath Source # 
Generic TgtAndPath Source # 

Associated Types

type Rep TgtAndPath :: * -> * #

Binary TgtAndPath Source # 
type Rep TgtAndPath Source # 
type Rep TgtAndPath = D1 * (MetaData "TgtAndPath" "Game.LambdaHack.Client.State" "LambdaHack-0.7.1.0-DR3wvpzgdHnDOaheiQUYWW" False) (C1 * (MetaCons "TgtAndPath" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "tapTgt") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Target)) (S1 * (MetaSel (Just Symbol "tapPath") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * AndPath))))

emptyStateClient :: FactionId -> StateClient Source #

Initial empty game client state.

updateTarget :: ActorId -> (Maybe Target -> Maybe Target) -> StateClient -> StateClient Source #

Update target parameters within client state.

getTarget :: ActorId -> StateClient -> Maybe Target Source #

Get target parameters from client state.

updateLeader :: ActorId -> State -> StateClient -> StateClient Source #

Update picked leader within state. Verify actor's faction.