LambdaHack-0.2.8: A roguelike game engine in early and active development

Safe HaskellNone

Game.LambdaHack.Client.Action.ActionClass

Description

Basic type classes for game actions. This module should not be imported anywhere except in Action and TypeAction.

Synopsis

Documentation

data SessionUI Source

The information that is constant across a client playing session, including many consecutive games in a single session, but is completely disregarded and reset when a new playing session starts. Auxiliary AI and computer player clients have no sfs nor sbinding.

Constructors

SessionUI 

Fields

sfconn :: !ConnFrontend

connection with the frontend

sbinding :: !Binding

binding of keys to commands

data ConnFrontend Source

Connection method between a client and a frontend.

Constructors

ConnFrontend 

Fields

readConnFrontend :: MonadClientUI m => m KM

read a keystroke received from the frontend

writeConnFrontend :: MonadClientUI m => FrontReq -> m ()

write a UI request to the frontend

data ConnServer c Source

Constructors

ConnServer 

Fields

readConnServer :: MonadConnClient c m => m c
 
writeConnServer :: MonadConnClient c m => CmdSer -> m ()
 

class MonadClient m => MonadClientUI m whereSource

Methods

getsSession :: (SessionUI -> a) -> m aSource

class MonadClient m => MonadConnClient c m | m -> c whereSource

Methods

getConn :: m (ConnServer c)Source

Instances

class MonadClient m => MonadClientAbort m whereSource

The bottom of the action monads class semilattice.

Methods

tryWith :: (Msg -> m a) -> m a -> m aSource

abortWith :: Msg -> m aSource