Server and client game state types and operations.
- data State
- sdungeon :: State -> Dungeon
- sdepth :: State -> Int
- sactorD :: State -> ActorDict
- sitemD :: State -> ItemDict
- sfactionD :: State -> FactionDict
- stime :: State -> Time
- scops :: State -> COps
- shigh :: State -> ScoreTable
- defStateGlobal :: Dungeon -> Int -> FactionDict -> COps -> ScoreTable -> State
- emptyState :: State
- localFromGlobal :: State -> State
- updateDungeon :: (Dungeon -> Dungeon) -> State -> State
- updateDepth :: (Int -> Int) -> State -> State
- updateActorD :: (ActorDict -> ActorDict) -> State -> State
- updateItemD :: (ItemDict -> ItemDict) -> State -> State
- updateFaction :: (FactionDict -> FactionDict) -> State -> State
- updateTime :: (Time -> Time) -> State -> State
- updateCOps :: (COps -> COps) -> State -> State
- getLocalTime :: LevelId -> State -> Time
- isHumanFaction :: FactionId -> State -> Bool
- usesAIFaction :: FactionId -> State -> Bool
- isSpawnFaction :: FactionId -> State -> Bool
- isSummonFaction :: FactionId -> State -> Bool
Basic game state, local or global
View on game state. Remembered fields carry a subset of the info
in the client copies of the state. Clients never directly change
State, but apply atomic actions sent by the server to do so.
Initial complete global game state.
Local state created by removing secret information from global state components.
Update faction data within state.
Tell whether the faction is controlled (at least partially) by a human.
Tell whether the faction uses AI to control any of its actors.