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

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Client.MonadClient

Contents

Description

Basic client monad and related operations.

Synopsis

Basic client monads

class MonadStateRead m => MonadClient m where Source #

Monad for writing to client state.

Minimal complete definition

getsClient, modifyClient, liftIO

Methods

getsClient :: (StateClient -> a) -> m a Source #

modifyClient :: (StateClient -> StateClient) -> m () Source #

liftIO :: IO a -> m a Source #

Assorted primitives

rndToAction :: MonadClient m => Rnd a -> m a Source #

Invoke pseudo-random computation with the generator kept in the state.

rndToActionForget :: MonadClient m => Rnd a -> m a Source #

Invoke pseudo-random computation, don't change generator kept in state.