    -- | Abstract syntax of requests.
    --
    -- See
    -- <https://github.com/LambdaHack/LambdaHack/wiki/Client-server-architecture>.
    module Game.LambdaHack.Client.Request
      ( RequestAI, ReqAI(..), RequestUI, ReqUI(..), RequestTimed(..)
      ) where

    import Prelude ()

    import Game.LambdaHack.Core.Prelude

    import           Game.LambdaHack.Common.Faction
    import           Game.LambdaHack.Common.Point
    import           Game.LambdaHack.Common.Types
    import           Game.LambdaHack.Common.Vector
    import           Game.LambdaHack.Content.ModeKind
    import qualified Game.LambdaHack.Definition.Ability as Ability
    import           Game.LambdaHack.Definition.Defs

    -- | Requests sent by AI clients to the server. If faction leader is to be
    -- changed, it's included as the second component.
    type RequestAI = (ReqAI, Maybe ActorId)

    -- | Possible forms of requests sent by AI clients.
    data ReqAI =
        ReqAINop
      | ReqAITimed RequestTimed
      deriving Int -> ReqAI -> ShowS
    [ReqAI] -> ShowS
    ReqAI -> String
    (Int -> ReqAI -> ShowS)
    -> (ReqAI -> String) -> ([ReqAI] -> ShowS) -> Show ReqAI
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> ReqAI -> ShowS
    showsPrec :: Int -> ReqAI -> ShowS
    $cshow :: ReqAI -> String
    show :: ReqAI -> String
    $cshowList :: [ReqAI] -> ShowS
    showList :: [ReqAI] -> ShowS
    Show

    -- | Requests sent by UI clients to the server. If faction leader is to be
    -- changed, it's included as the second component.
    type RequestUI = (ReqUI, Maybe ActorId)

    -- | Possible forms of requests sent by UI clients.
    data ReqUI =
        ReqUINop
      | ReqUITimed RequestTimed
      | ReqUIGameRestart (GroupName ModeKind) Challenge
      | ReqUIGameDropAndExit
      | ReqUIGameSaveAndExit
      | ReqUIGameSave
      | ReqUIDoctrine Ability.Doctrine
      | ReqUIAutomate
      deriving Int -> ReqUI -> ShowS
    [ReqUI] -> ShowS
    ReqUI -> String
    (Int -> ReqUI -> ShowS)
    -> (ReqUI -> String) -> ([ReqUI] -> ShowS) -> Show ReqUI
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> ReqUI -> ShowS
    showsPrec :: Int -> ReqUI -> ShowS
    $cshow :: ReqUI -> String
    show :: ReqUI -> String
    $cshowList :: [ReqUI] -> ShowS
    showList :: [ReqUI] -> ShowS
    Show

    -- | Requests that take game time.
    data RequestTimed =
        ReqMove Vector
      | ReqMelee ActorId ItemId CStore
      | ReqDisplace ActorId
      | ReqAlter Point
      | ReqWait
      | ReqWait10
      | ReqYell
      | ReqMoveItems [(ItemId, Int, CStore, CStore)]
      | ReqProject Point Int ItemId CStore
      | ReqApply ItemId CStore
      deriving Int -> RequestTimed -> ShowS
    [RequestTimed] -> ShowS
    RequestTimed -> String
    (Int -> RequestTimed -> ShowS)
    -> (RequestTimed -> String)
    -> ([RequestTimed] -> ShowS)
    -> Show RequestTimed
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> RequestTimed -> ShowS
    showsPrec :: Int -> RequestTimed -> ShowS
    $cshow :: RequestTimed -> String
    show :: RequestTimed -> String
    $cshowList :: [RequestTimed] -> ShowS
    showList :: [RequestTimed] -> ShowS
    Show