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

36 lines
592 B
Haskell
Raw Normal View History

module Client.Types where
2023-12-10 14:18:40 +00:00
import Control.Monad.RWS
import Data.UUID
import Options.Applicative as O
2023-12-10 14:18:40 +00:00
import System.IO
-- 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"
)
2023-12-10 14:18:40 +00:00
data ReaderContainer = ReaderContainer
{ rcSocketHandle :: Handle
, rcClientUUID :: UUID
}
newtype StateContainer = StateContainer
{ scWizard :: Wizard
}
type Game = RWST ReaderContainer String StateContainer IO