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

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Client.State

Description

Server and client game state types and operations.

Synopsis

Documentation

data StateClient Source #

Client state, belonging to a single faction. Some of the data, e.g, the history, carries over from game to game, even across playing sessions. Data invariant: if _sleader is Nothing then so is srunning.

Constructors

StateClient 

Fields

defStateClient :: History -> Report -> FactionId -> Bool -> StateClient Source #

Initial 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.

type PathEtc = ([Point], (Point, Int)) Source #

newtype TgtMode Source #

Current targeting mode of a client.

Constructors

TgtMode 

Fields

data RunParams Source #

Parameters of the current run.

Constructors

RunParams 

Fields

type LastRecord = ([KM], [KM], Int) Source #