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

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.SampleImplementation.SampleMonadClient

Contents

Description

The main game action monad type implementation. Just as any other component of the library, this implementation can be substituted. This module should not be imported anywhere except in Action to expose the executor to any code using the library.

Synopsis

Documentation

executorCli :: CliImplementation () -> Maybe SessionUI -> COps -> FactionId -> ChanServer -> IO () Source #

Init the client, then run an action, with a given session, state and history, in the IO monad.

Internal operations

data CliState Source #

Constructors

CliState 

Fields

Instances

Generic CliState Source # 

Associated Types

type Rep CliState :: * -> * #

Methods

from :: CliState -> Rep CliState x #

to :: Rep CliState x -> CliState #

type Rep CliState Source # 

newtype CliImplementation a Source #

Client state transformation monad.

Instances

Monad CliImplementation Source # 
Functor CliImplementation Source # 
Applicative CliImplementation Source # 
MonadStateRead CliImplementation Source # 

Methods

getsState :: (State -> a) -> CliImplementation a Source #

MonadStateWrite CliImplementation Source # 
MonadAtomic CliImplementation Source #

The game-state semantics of atomic commands as computed on the client.

MonadClientSetup CliImplementation Source # 
MonadClient CliImplementation Source # 
MonadClientUI CliImplementation Source # 
MonadClientWriteRequest CliImplementation Source # 
MonadClientReadResponse CliImplementation Source #