Safe Haskell | None |
---|---|
Language | Haskell2010 |
Semantics of human player commands.
Synopsis
- cmdHumanSem :: MonadClientUI m => HumanCmd -> m (Either MError ReqUI)
- noRemoteHumanCmd :: HumanCmd -> Bool
- cmdAction :: MonadClientUI m => HumanCmd -> m (Either MError ReqUI)
- addNoError :: Monad m => m () -> m (Either MError ReqUI)
Documentation
cmdHumanSem :: MonadClientUI m => HumanCmd -> m (Either MError ReqUI) Source #
The semantics of human player commands in terms of the client monad.
Some time cosuming commands are enabled even in aiming mode, but cannot be invoked in aiming mode on a remote level (level different than the level of the leader), which is caught here.
Internal operations
noRemoteHumanCmd :: HumanCmd -> Bool Source #
Commands that are forbidden on a remote level, because they would usually take time when invoked on one, but not necessarily do what the player expects. Note that some commands that normally take time are not included, because they don't take time in aiming mode or their individual sanity conditions include a remote level check.