Safe Haskell | None |
---|
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.
- type FunActionCli c d a = SessionUI -> (ChanServer c d, ChanSave (State, StateClient)) -> (State -> StateClient -> a -> IO ()) -> (StdGen -> Msg -> IO ()) -> State -> StateClient -> IO ()
- data ActionCli c d a
- executorCli :: ActionCli c d () -> SessionUI -> State -> StateClient -> ChanServer c d -> IO ()
Documentation
type FunActionCli c d aSource
= SessionUI | client UI setup data |
-> (ChanServer c d, ChanSave (State, StateClient)) | this client connection information |
-> (State -> StateClient -> a -> IO ()) | continuation |
-> (StdGen -> Msg -> IO ()) | failure/reset continuation |
-> State | current local state |
-> StateClient | current client state |
-> IO () |
The type of the function inside any client action.
Client parts of actions of human and computer player characters.
MonadClientWriteServer d (ActionCli c d) | |
MonadClientReadServer c (ActionCli c d) | |
Monad (ActionCli c d) | |
Functor (ActionCli c d) | |
Applicative (ActionCli c d) | |
MonadAction (ActionCli c d) | |
MonadActionRO (ActionCli c d) | |
MonadClientAbort (ActionCli c d) | |
MonadClientUI (ActionCli c d) | |
MonadClient (ActionCli c d) |
executorCli :: ActionCli c d () -> SessionUI -> State -> StateClient -> ChanServer c d -> IO ()Source
Init the client, then run an action, with a given session,
state and history, in the IO
monad.