summaryrefslogtreecommitdiffstats
path: root/HTanks.hs
diff options
context:
space:
mode:
Diffstat (limited to 'HTanks.hs')
-rw-r--r--HTanks.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/HTanks.hs b/HTanks.hs
index 8d3603e..a6ade4f 100644
--- a/HTanks.hs
+++ b/HTanks.hs
@@ -105,8 +105,9 @@ simulationStep = do
handleEvents :: Main ()
handleEvents = do
event <- gets driver >>= liftIO . nextEvent
- when (isJust event) $
- handleEvent $ fromJust event
+ when (isJust event) $ do
+ handleEvent $ fromJust event
+ handleEvents
handleEvent :: SomeEvent -> Main ()
handleEvent ev