| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Game.LambdaHack.Client.State
Description
Client-specific game state components.
Synopsis
- data StateClient = StateClient {
- seps :: Int
- stargetD :: EnumMap ActorId TgtAndPath
- sfleeD :: EnumMap ActorId Point
- sexplored :: EnumSet LevelId
- sbfsD :: EnumMap ActorId BfsAndPath
- sundo :: [CmdAtomic]
- sdiscoBenefit :: DiscoveryBenefit
- sfper :: PerLid
- salter :: AlterLid
- srandom :: StdGen
- _sleader :: Maybe ActorId
- _sside :: FactionId
- squit :: Bool
- scurChal :: Challenge
- snxtChal :: Challenge
- snxtScenario :: Int
- smarkSuspect :: Int
- scondInMelee :: EnumMap LevelId Bool
- svictories :: EnumMap (ContentId ModeKind) (Map Challenge Int)
- soptions :: ClientOptions
- type AlterLid = EnumMap LevelId (Array Word8)
- data BfsAndPath
- = BfsInvalid
- | BfsAndPath { }
- data TgtAndPath = TgtAndPath {}
- emptyStateClient :: FactionId -> StateClient
- cycleMarkSuspect :: StateClient -> StateClient
- updateTarget :: ActorId -> (Maybe Target -> Maybe Target) -> StateClient -> StateClient
- getTarget :: ActorId -> StateClient -> Maybe Target
- updateLeader :: ActorId -> State -> StateClient -> StateClient
- sside :: StateClient -> FactionId
- sleader :: StateClient -> Maybe ActorId
Documentation
data StateClient Source #
Client state, belonging to a single faction.
Constructors
| StateClient | |
Fields
| |
Instances
| Show StateClient Source # | |
Defined in Game.LambdaHack.Client.State Methods showsPrec :: Int -> StateClient -> ShowS # show :: StateClient -> String # showList :: [StateClient] -> ShowS # | |
| Binary StateClient Source # | |
Defined in Game.LambdaHack.Client.State | |
data BfsAndPath Source #
Pathfinding distances to all reachable positions of an actor and a shortest paths to some of the positions.
Constructors
| BfsInvalid | |
| BfsAndPath | |
Instances
| Show BfsAndPath Source # | |
Defined in Game.LambdaHack.Client.State Methods showsPrec :: Int -> BfsAndPath -> ShowS # show :: BfsAndPath -> String # showList :: [BfsAndPath] -> ShowS # | |
data TgtAndPath Source #
Actor's target and a path to it, if any.
Constructors
| TgtAndPath | |
Instances
| Show TgtAndPath Source # | |
Defined in Game.LambdaHack.Client.State Methods showsPrec :: Int -> TgtAndPath -> ShowS # show :: TgtAndPath -> String # showList :: [TgtAndPath] -> ShowS # | |
| Generic TgtAndPath Source # | |
Defined in Game.LambdaHack.Client.State Associated Types type Rep TgtAndPath :: * -> * # | |
| Binary TgtAndPath Source # | |
Defined in Game.LambdaHack.Client.State | |
| type Rep TgtAndPath Source # | |
Defined in Game.LambdaHack.Client.State type Rep TgtAndPath = D1 (MetaData "TgtAndPath" "Game.LambdaHack.Client.State" "LambdaHack-0.8.3.0-5WMRdylEY9jFLqYScFUab7" False) (C1 (MetaCons "TgtAndPath" PrefixI True) (S1 (MetaSel (Just "tapTgt") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 Target) :*: S1 (MetaSel (Just "tapPath") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 AndPath))) | |
emptyStateClient :: FactionId -> StateClient Source #
Initial empty game client state.
cycleMarkSuspect :: StateClient -> StateClient Source #
Cycle the smarkSuspect setting.
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.
sside :: StateClient -> FactionId Source #