wizard-wipeout/src-client/Main.hs
2023-12-10 12:57:36 +01:00

32 lines
714 B
Haskell

module Main where
import Control.Concurrent (threadDelay)
import Options.Applicative
import System.IO
-- internal imports
import Client.Communication
import Client.Types
main :: IO ()
main = do
putStrLn "Hello, Arena!"
(Options socketLocation) <- execParser opts
putStrLn $ "connecting to Socket " <> socketLocation
handle <- connectSocket socketLocation
-- mock communication code
hPutStrLn handle "meow!"
hFlush handle
threadDelay $ 5 * 10 ^ 6
hPutStrLn handle "Goodbye!"
hFlush handle
-- end mock
where
opts = info (options <**> helper)
( fullDesc
<> progDesc "Run the \"wizard-wipeout\" Server."
<> header "wizard-wipeout - Last Mage standing"
)