LambdaHack- A game engine library for tactical squad ASCII roguelike dungeon crawlers
Safe HaskellNone



The monad for writing to the main game state.



class MonadStateRead m => MonadStateWrite m where Source #

The monad for writing to the main game state. Atomic updates (UpdAtomic) are given semantics in this monad.


modifyState :: (State -> State) -> m () Source #

putState :: State -> m () Source #

newtype AtomicFail Source #

Exception signifying that atomic action failed because the information it carries is inconsistent with the client's state, (e.g., because the client knows too little to understand the command or already deduced the state change from earlier commands or is confused, amnesiac or sees illusory actors or tiles). Whenever we know the failure is logically impossible, we don't throw the AtomicFail exception, but insert a normal assertion or error call, which are never caught nor handled.


AtomicFail String 

Internal operations