make debugging a bit easier
This commit is contained in:
parent
4b8c2eb9fa
commit
98214fdb38
3 changed files with 4 additions and 4 deletions
|
@ -99,7 +99,7 @@ receiveMessage sock queue = do
|
||||||
(\msg -> do
|
(\msg -> do
|
||||||
let mJsonMsg = A.decode' msg
|
let mJsonMsg = A.decode' msg
|
||||||
maybe
|
maybe
|
||||||
(putStrLn $ "received garbled data: " <> B8.unpack msg)
|
(putStrLn $ "received garbled data: " <> B8.unpack (B8.fromStrict rawMsg))
|
||||||
(STM.atomically . STM.writeTQueue queue)
|
(STM.atomically . STM.writeTQueue queue)
|
||||||
mJsonMsg
|
mJsonMsg
|
||||||
)
|
)
|
||||||
|
|
|
@ -31,7 +31,7 @@ runGame = do
|
||||||
(not . clientStop <$> (liftIO . STM.atomically . STM.readTMVar =<< gets scClientState))
|
(not . clientStop <$> (liftIO . STM.atomically . STM.readTMVar =<< gets scClientState))
|
||||||
(do
|
(do
|
||||||
handleMessages
|
handleMessages
|
||||||
draw
|
-- draw
|
||||||
)
|
)
|
||||||
liftIO $ killThread recvThread
|
liftIO $ killThread recvThread
|
||||||
|
|
||||||
|
|
|
@ -58,10 +58,10 @@ main = do
|
||||||
|
|
||||||
cfg <- standardIOConfig
|
cfg <- standardIOConfig
|
||||||
vty <- mkVty cfg
|
vty <- mkVty cfg
|
||||||
hideCursor (outputIface vty)
|
-- hideCursor (outputIface vty)
|
||||||
|
|
||||||
-- shut down graphical interface for now
|
-- shut down graphical interface for now
|
||||||
-- shutdown vty
|
shutdown vty
|
||||||
|
|
||||||
clientState <- STM.newTMVarIO (ClientState vty False False)
|
clientState <- STM.newTMVarIO (ClientState vty False False)
|
||||||
let initSlice = MapSlice (M.matrix 9 9 (const Nothing)) []
|
let initSlice = MapSlice (M.matrix 9 9 (const Nothing)) []
|
||||||
|
|
Loading…
Reference in a new issue