play : Display -> Color -> Double -> a -> (a -> Picture) -> (Eve -> a -> a) -> (Double -> a -> a) -> IO ()Play a game in a window. Like simulate, but you manage your own input events.
@ window Display mode.
@ bgColor Background color.
@ tpf Time per frame. Providing frames per seconds control. (FPS) = 1/<value> (0: unlimited FPS)
@ w The initial world.
@ w2p A function to convert the world to a picture.
@ ew2w A function to handle input events.
@ tw2w A function to step the world one iteration. It passes the amount of time (seconds) since the window creation.
playStateT : Display -> Color -> Double -> a -> StateT a IO Picture -> (Eve -> StateT a IO ()) -> (Double -> StateT a IO ()) -> IO ()Play a game with mutable state in a window.
Like simulate, but you manage your own input events.
@ window Display mode.
@ bgColor Background color.
@ tpf Time per frame. Providing frames per seconds control. (FPS) = 1/<value> (0: unlimited FPS)
@ stateType The initial world.
@ w2p Describes how to produce pictures to show.
@ e2w A stateful function that handles input events.
@ t2w A stateful function that handles the amount of time (seconds) since the window creation.