make debugging a bit easier

This commit is contained in:
nek0 2024-01-23 11:13:52 +01:00
parent 4b8c2eb9fa
commit 98214fdb38
3 changed files with 4 additions and 4 deletions

View file

@ -99,7 +99,7 @@ receiveMessage sock queue = do
(\msg -> do
let mJsonMsg = A.decode' msg
maybe
(putStrLn $ "received garbled data: " <> B8.unpack msg)
(putStrLn $ "received garbled data: " <> B8.unpack (B8.fromStrict rawMsg))
(STM.atomically . STM.writeTQueue queue)
mJsonMsg
)

View file

@ -31,7 +31,7 @@ runGame = do
(not . clientStop <$> (liftIO . STM.atomically . STM.readTMVar =<< gets scClientState))
(do
handleMessages
draw
-- draw
)
liftIO $ killThread recvThread

View file

@ -58,10 +58,10 @@ main = do
cfg <- standardIOConfig
vty <- mkVty cfg
hideCursor (outputIface vty)
-- hideCursor (outputIface vty)
-- shut down graphical interface for now
-- shutdown vty
shutdown vty
clientState <- STM.newTMVarIO (ClientState vty False False)
let initSlice = MapSlice (M.matrix 9 9 (const Nothing)) []