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



Client monad for interacting with a human through UI.


Client UI monad

class MonadClientRead m => MonadClientUI m where Source #

The monad that gives the client access to UI operations, but not to modifying client state, except for the client-side pointman (as opposed to pointman stores in faction data in main game state), which is more of a UI concept, but is shared with AI to be able to keep it when switching AI on/off and to save on typing.

Assorted primitives

displayFrames :: MonadClientUI m => LevelId -> PreFrames3 -> m () Source #

Push frames or delays to the frame queue. The frames depict the lid level.

connFrontendFrontKey :: MonadClientUI m => [KM] -> PreFrame3 -> m KM Source #

Write FrontKey UI request to the frontend, read the reply, set pointer, return key.

chanFrontend :: MonadClientUI m => ScreenContent -> ClientOptions -> m ChanFrontend Source #

Initialize the frontend chosen by the player via client options.

partActorLeader :: MonadClientUI m => ActorId -> m Part Source #

The part of speech describing the actor or the "you" pronoun if he is the leader of the observer's faction.

partPronounLeader :: MonadClientUI m => ActorId -> m Part Source #

The part of speech with the actor's pronoun or "you" if a leader of the client's faction.

tryRestore :: MonadClientUI m => m (Maybe (StateClient, Maybe SessionUI)) Source #

Try to read saved client game state from the file system.

rndToActionUI :: MonadClientUI m => Rnd a -> m a Source #

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

Internal operations

connFrontend :: MonadClientUI m => FrontReq a -> m a Source #

Write a UI request to the frontend and read a corresponding reply.