Safe Haskell | None |
---|---|
Language | Haskell2010 |
- play :: GleamConfig -> model -> (model -> Picture) -> (model -> model) -> (InputEvent -> model -> model) -> IO ()
- playMultiple :: [Simulation] -> IO ()
- module Picture
- module InputEvent
- module Color
- module Settings
- module Text
Documentation
:: GleamConfig | Canvas size. |
-> model | Initial model for the simulation. |
-> (model -> Picture) | Function to generate a picture from a model. |
-> (model -> model) | Function to update the state of the simulation. |
-> (InputEvent -> model -> model) | Function to handle input events. |
-> IO () |
Run a simulation in a window. You decide how the model is represented, how to convert the model to a picture and how to update the model. This function does the rest. The simulation can be seen on `127.0.0.1:8023`
playMultiple :: [Simulation] -> IO () Source #
Run multiple simulations in a window. You decide how each model is represented, how to convert each model to a picture and how to update the model. This function does the rest. The simulations can be seen on `127.0.0.1:8023`
module Picture
module InputEvent
module Color
module Settings
module Text