make options

This commit is contained in:
nek0 2023-12-08 02:26:29 +01:00
parent 0243029d89
commit bf2310a011
2 changed files with 11 additions and 6 deletions

View file

@ -4,12 +4,16 @@ module Server.Options where
import qualified Data.Aeson as Aeson
import GHC.Generics
data Options = Options
{ optSocketPath :: FilePath
, optMapRows :: Int
, optMapColumns :: Int
, optSpawnerProbability :: Float
data Settings = Settings
{ setSocketPath :: FilePath
, setMapRows :: Int
, setMapColumns :: Int
, setSpawnerProbability :: Float
}
deriving (Show, Generic)
instance Aeson.FromJSON Options
instance Aeson.FromJSON Settings
data Options = Options
{ optConfLoc :: FilePath
}

View file

@ -43,6 +43,7 @@ executable wizard-wipeout-server
main-is: Main.hs
other-modules: Server.Map
Server.Map.Snippets
Server.Types
-- other-extensions:
build-depends: base ^>=4.17.2.1
, linear