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

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Server.MonadServer

Contents

Description

Game action monads and basic building blocks for human and computer player actions. Has no access to the main action type. Does not export the liftIO operation nor a few other implementation details.

Synopsis

The server monad

Assorted primitives

dumpRngs :: MonadServer m => RNGs -> m () Source #

Dumps RNG states from the start of the game to stdout.

restoreScore :: forall m. MonadServer m => COps -> m ScoreDict Source #

Read the high scores dictionary. Return the empty table if no file.

registerScore :: MonadServer m => Status -> FactionId -> m () Source #

Generate a new score, register it and save.

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

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

getSetGen :: MonadServer m => Maybe StdGen -> m StdGen Source #

Gets a random generator from the arguments or, if not present, generates one.