From 12b9253d857be440b0fc72a3344de20e4c60732a Mon Sep 17 00:00:00 2001 From: Jeanne-Kamikaze Date: Sat, 17 Aug 2013 18:59:29 +0200 Subject: Added run function --- demos/pong/Main.hs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'demos/pong/Main.hs') diff --git a/demos/pong/Main.hs b/demos/pong/Main.hs index 8c379ec..e9a6dc1 100644 --- a/demos/pong/Main.hs +++ b/demos/pong/Main.hs @@ -18,14 +18,9 @@ data GameState = GameState , world :: [GameObject] } -main = do - result <- run - case result of - Left err -> putStrLn err - Right _ -> return () - -run = withWindow (640,480) [] Window (2,0) (Just "Pong") initGame - $ loop (Just 30) step +main = run + $ withWindow (640,480) [] Window (2,0) (Just "Pong") initGame + $ loop (Just 30) step initGame wnd = do gameIO $ do -- cgit v1.2.3