{-# LANGUAGE DeriveGeneric #-}

module Battlesnake.API.MoveResponse where

import Battlesnake.Core.Direction
import Data.Aeson (ToJSON)
import Data.Text
import GHC.Generics

-- | The response to a move request.
data MoveResponse = MoveResponse
  { MoveResponse -> Direction
move :: Direction, -- ^ The direction for the next move.
    MoveResponse -> Maybe Text
shout :: Maybe Text -- ^ An optional shout to be displayed with the move.
  }
  deriving (Int -> MoveResponse -> ShowS
[MoveResponse] -> ShowS
MoveResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MoveResponse] -> ShowS
$cshowList :: [MoveResponse] -> ShowS
show :: MoveResponse -> String
$cshow :: MoveResponse -> String
showsPrec :: Int -> MoveResponse -> ShowS
$cshowsPrec :: Int -> MoveResponse -> ShowS
Show, forall x. Rep MoveResponse x -> MoveResponse
forall x. MoveResponse -> Rep MoveResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MoveResponse x -> MoveResponse
$cfrom :: forall x. MoveResponse -> Rep MoveResponse x
Generic)

instance ToJSON MoveResponse