make options
This commit is contained in:
parent
0243029d89
commit
bf2310a011
2 changed files with 11 additions and 6 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue