From bf2310a011a7a4eefa96c60a366f44b558ffe19d Mon Sep 17 00:00:00 2001 From: nek0 Date: Fri, 8 Dec 2023 02:26:29 +0100 Subject: [PATCH] make options --- src-server/Server/Types.hs | 16 ++++++++++------ wizard-wipeout.cabal | 1 + 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src-server/Server/Types.hs b/src-server/Server/Types.hs index ce3c34e..11c76bf 100644 --- a/src-server/Server/Types.hs +++ b/src-server/Server/Types.hs @@ -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 + } diff --git a/wizard-wipeout.cabal b/wizard-wipeout.cabal index c761989..a27fb5c 100644 --- a/wizard-wipeout.cabal +++ b/wizard-wipeout.cabal @@ -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