simulate : Display -> Color -> Double -> a -> (a -> Picture) -> (Double -> a -> a) -> IO ()Run a simulation in a window.
@ window Display mode.
@ bgColor Background color.
@ tpf Time per frame. Providing frames per seconds control. (FPS) = 1/<value> (0: unlimited FPS)
@ model The initial model.
@ m2p Function to step the model one iteration.
@ m2m A function to step the model one iteration. It passes the amount of time (seconds) since the window creation.
simulateStateT : Display -> Color -> Double -> a -> StateT a IO Picture -> (Double -> StateT a IO ()) -> IO ()Run a simulation with mutable state in a window.
@ window Display mode.
@ bgColor Background color.
@ tpf Time per frame. Providing frames per seconds control. (FPS) = 1/<value> (0: unlimited FPS)
@ model The initial model.
@ m2p Describes how to produce pictures to show.
@ m2m A stateful function to step the model one iteration. It passes the amount of time (seconds) since the window creation.