24 lines
399 B
Haskell
24 lines
399 B
Haskell
|
module Client.Game where
|
||
|
|
||
|
import qualified Control.Concurrent.STM as STM
|
||
|
|
||
|
import Control.Monad.Loops
|
||
|
|
||
|
import Control.Monad.RWS
|
||
|
|
||
|
-- internal imports
|
||
|
|
||
|
import Client.Communication
|
||
|
import Client.Types
|
||
|
|
||
|
import Library.Types
|
||
|
|
||
|
runGame :: Game ()
|
||
|
runGame = do
|
||
|
handleMessages
|
||
|
whileM_
|
||
|
(not . clientStop <$> (liftIO . STM.atomically . STM.readTMVar =<< gets scClientState))
|
||
|
(do
|
||
|
pure ()
|
||
|
)
|