Safe Haskell | None |
---|---|
Language | Haskell2010 |
Client-specific game state components.
- data StateClient = StateClient {
- seps :: Int
- stargetD :: EnumMap ActorId TgtAndPath
- 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 (Maybe Bool)
- svictories :: EnumMap (Id 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.
StateClient | |
|
data BfsAndPath Source #
Pathfinding distances to all reachable positions of an actor and a shortest paths to some of the positions.
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 #