prepare for actual data

This commit is contained in:
nek0 2023-12-10 15:18:40 +01:00
parent 71451df387
commit 03679ef1fa
2 changed files with 24 additions and 0 deletions

View file

@ -1,7 +1,17 @@
module Client.Types where module Client.Types where
import Control.Monad.RWS
import Data.UUID
import Options.Applicative as O import Options.Applicative as O
import System.IO
-- internal imports
import Library.Types
newtype Options = Options newtype Options = Options
{ optSockLoc :: FilePath { optSockLoc :: FilePath
} }
@ -12,3 +22,14 @@ options = Options
( metavar "FILEPATH" ( metavar "FILEPATH"
<> help "Location of the server's socket" <> help "Location of the server's socket"
) )
data ReaderContainer = ReaderContainer
{ rcSocketHandle :: Handle
, rcClientUUID :: UUID
}
newtype StateContainer = StateContainer
{ scWizard :: Wizard
}
type Game = RWST ReaderContainer String StateContainer IO

View file

@ -19,7 +19,9 @@ common warnings
library library
import: warnings import: warnings
exposed-modules: Library.Types exposed-modules: Library.Types
Library.Types.Communication
build-depends: base ^>=4.17.2.1 build-depends: base ^>=4.17.2.1
, aeson
, linear , linear
, matrix , matrix
, random , random
@ -38,6 +40,7 @@ executable wizard-wipeout-client
, mtl , mtl
, network , network
, optparse-applicative , optparse-applicative
, uuid
, vty , vty
, wizard-wipeout , wizard-wipeout
hs-source-dirs: src-client hs-source-dirs: src-client