wizard-wipeout/src-client/Client/Types.hs

37 lines
631 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
{ rcSocket :: Socket
, rcClientUUID :: UUID
}
newtype StateContainer = StateContainer
{ scWizard :: Wizard
, scClientState :: ClientState
}
type Game = RWST ReaderContainer String StateContainer IO