aboutsummaryrefslogtreecommitdiff
path: root/demos/pong
diff options
context:
space:
mode:
authorJeanne-Kamikaze <jeannekamikaze@gmail.com>2013-08-17 18:59:29 +0200
committerJeanne-Kamikaze <jeannekamikaze@gmail.com>2013-08-17 18:59:29 +0200
commit12b9253d857be440b0fc72a3344de20e4c60732a (patch)
tree100c05f427a65b1949dbbcc4db3d5dbd8f86e281 /demos/pong
parent59d2edd9877a2aa1e243597052a3af6bbeefa3cf (diff)
Added run function
Diffstat (limited to 'demos/pong')
-rw-r--r--demos/pong/Main.hs11
1 files changed, 3 insertions, 8 deletions
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
18 , world :: [GameObject] 18 , world :: [GameObject]
19 } 19 }
20 20
21main = do 21main = run
22 result <- run 22 $ withWindow (640,480) [] Window (2,0) (Just "Pong") initGame
23 case result of 23 $ loop (Just 30) step
24 Left err -> putStrLn err
25 Right _ -> return ()
26
27run = withWindow (640,480) [] Window (2,0) (Just "Pong") initGame
28 $ loop (Just 30) step
29 24
30initGame wnd = do 25initGame wnd = do
31 gameIO $ do 26 gameIO $ do