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

Game.LambdaHack.Client.UI.MonadClientUI

Description

Client monad for interacting with a human through UI.

Synopsis

Client UI monad

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.