diff options
Diffstat (limited to 'demos')
| -rw-r--r-- | demos/pong/Main.hs | 11 |
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 | ||
| 21 | main = do | 21 | main = 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 | |||
| 27 | run = withWindow (640,480) [] Window (2,0) (Just "Pong") initGame | ||
| 28 | $ loop (Just 30) step | ||
| 29 | 24 | ||
| 30 | initGame wnd = do | 25 | initGame wnd = do |
| 31 | gameIO $ do | 26 | gameIO $ do |
