19 lines
402 B
Haskell
19 lines
402 B
Haskell
{-# LANGUAGE DeriveGeneric #-}
|
|
module Server.Options where
|
|
|
|
import qualified Data.Aeson as Aeson
|
|
import GHC.Generics
|
|
|
|
data Settings = Settings
|
|
{ setSocketPath :: FilePath
|
|
, setMapRows :: Int
|
|
, setMapColumns :: Int
|
|
, setSpawnerProbability :: Float
|
|
}
|
|
deriving (Show, Generic)
|
|
|
|
instance Aeson.FromJSON Settings
|
|
|
|
data Options = Options
|
|
{ optConfLoc :: FilePath
|
|
}
|