{-# LANGUAGE DeriveGeneric #-}
module Battlesnake.Core.RulesetSettings where
import Data.Aeson (FromJSON)
import GHC.Generics
data RulesetSettings = RulesetSettings
{ RulesetSettings -> Int
foodSpawnChance :: Int
, RulesetSettings -> Int
minimumFood :: Int
, RulesetSettings -> Int
hazardDamagePerTurn :: Int
, RulesetSettings -> RoyaleModeSettings
royale :: RoyaleModeSettings
, RulesetSettings -> SquadModeSettings
squad :: SquadModeSettings
}
deriving (Int -> RulesetSettings -> ShowS
[RulesetSettings] -> ShowS
RulesetSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RulesetSettings] -> ShowS
$cshowList :: [RulesetSettings] -> ShowS
show :: RulesetSettings -> String
$cshow :: RulesetSettings -> String
showsPrec :: Int -> RulesetSettings -> ShowS
$cshowsPrec :: Int -> RulesetSettings -> ShowS
Show, RulesetSettings -> RulesetSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RulesetSettings -> RulesetSettings -> Bool
$c/= :: RulesetSettings -> RulesetSettings -> Bool
== :: RulesetSettings -> RulesetSettings -> Bool
$c== :: RulesetSettings -> RulesetSettings -> Bool
Eq, forall x. Rep RulesetSettings x -> RulesetSettings
forall x. RulesetSettings -> Rep RulesetSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RulesetSettings x -> RulesetSettings
$cfrom :: forall x. RulesetSettings -> Rep RulesetSettings x
Generic)
instance FromJSON RulesetSettings
newtype RoyaleModeSettings = RoyaleModeSettings
{ RoyaleModeSettings -> Int
shrinkEveryNTurns :: Int
}
deriving (Int -> RoyaleModeSettings -> ShowS
[RoyaleModeSettings] -> ShowS
RoyaleModeSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RoyaleModeSettings] -> ShowS
$cshowList :: [RoyaleModeSettings] -> ShowS
show :: RoyaleModeSettings -> String
$cshow :: RoyaleModeSettings -> String
showsPrec :: Int -> RoyaleModeSettings -> ShowS
$cshowsPrec :: Int -> RoyaleModeSettings -> ShowS
Show, RoyaleModeSettings -> RoyaleModeSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RoyaleModeSettings -> RoyaleModeSettings -> Bool
$c/= :: RoyaleModeSettings -> RoyaleModeSettings -> Bool
== :: RoyaleModeSettings -> RoyaleModeSettings -> Bool
$c== :: RoyaleModeSettings -> RoyaleModeSettings -> Bool
Eq, forall x. Rep RoyaleModeSettings x -> RoyaleModeSettings
forall x. RoyaleModeSettings -> Rep RoyaleModeSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RoyaleModeSettings x -> RoyaleModeSettings
$cfrom :: forall x. RoyaleModeSettings -> Rep RoyaleModeSettings x
Generic)
instance FromJSON RoyaleModeSettings
data SquadModeSettings = SquadModeSettings
{ SquadModeSettings -> Bool
allowBodyCollisions :: Bool
, SquadModeSettings -> Bool
sharedElimination :: Bool
, SquadModeSettings -> Bool
sharedHealth :: Bool
, SquadModeSettings -> Bool
sharedLength :: Bool
}
deriving (Int -> SquadModeSettings -> ShowS
[SquadModeSettings] -> ShowS
SquadModeSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SquadModeSettings] -> ShowS
$cshowList :: [SquadModeSettings] -> ShowS
show :: SquadModeSettings -> String
$cshow :: SquadModeSettings -> String
showsPrec :: Int -> SquadModeSettings -> ShowS
$cshowsPrec :: Int -> SquadModeSettings -> ShowS
Show, SquadModeSettings -> SquadModeSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SquadModeSettings -> SquadModeSettings -> Bool
$c/= :: SquadModeSettings -> SquadModeSettings -> Bool
== :: SquadModeSettings -> SquadModeSettings -> Bool
$c== :: SquadModeSettings -> SquadModeSettings -> Bool
Eq, forall x. Rep SquadModeSettings x -> SquadModeSettings
forall x. SquadModeSettings -> Rep SquadModeSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SquadModeSettings x -> SquadModeSettings
$cfrom :: forall x. SquadModeSettings -> Rep SquadModeSettings x
Generic)
instance FromJSON SquadModeSettings