{-# LANGUAGE LambdaCase #-} module Main where import Control.Concurrent (threadDelay) import Options.Applicative -- internal imports import Client.Communication import Client.Types import Library.Types main :: IO () main = do putStrLn "Hello, Arena!" (Options socketLocation) <- execParser opts putStrLn $ "connecting to Socket " <> socketLocation sock <- connectSocket socketLocation putStrLn "connected" sendMessage (IdRequest) sock threadDelay $ 5 * 10 ^ 6 clientId <- receiveMessage sock putStrLn $ "received client UUID: " <> show (acClientUUID clientId) where opts = info (options <**> helper) ( fullDesc <> progDesc "Run the \"wizard-wipeout\" Server." <> header "wizard-wipeout - Last Mage standing" )