wizard-wipeout/src-client/Client/Types.hs
2023-12-10 20:12:53 +01:00

35 lines
597 B
Haskell

module Client.Types where
import Control.Monad.RWS
import Data.UUID
import Network.Socket
import Options.Applicative as O
-- internal imports
import Library.Types
newtype Options = Options
{ optSockLoc :: FilePath
}
options :: O.Parser Options
options = Options
<$> argument str
( metavar "FILEPATH"
<> help "Location of the server's socket"
)
data ReaderContainer = ReaderContainer
{ rcSocketHandle :: Socket
, rcClientUUID :: UUID
}
newtype StateContainer = StateContainer
{ scWizard :: Wizard
}
type Game = RWST ReaderContainer String StateContainer IO