|
|
|
|
|
Description |
A wrapper for 2D Cellular Automata.
Hides details about displaying the grid.
|
|
Synopsis |
|
|
|
Documentation |
|
data Control |
CA Control Settings.
| Constructors | Control | | controlN :: Integer | | controlRun :: Bool | | controlWindowSize :: (Int, Int) | | controlSquareSize :: Int | | controlSquareSkip :: Int | | controlGridSize :: (Int, Int) | | controlWarp :: Int | |
|
|
|
|
runCA |
:: String | The name of the window.
| -> Int | The size of the square in the grid (in pixels)
| -> Int | Number of iterations per frame.
| -> world | The initial world.
| -> (world -> [[Color]]) | A function to convert the world to a grid of colored cells.
| -> (world -> world) | A function to step the world one iteration.
| -> IO () | | Run a 2D Cellular Automata, displaying each frame in a window.
|
|
|
callbackDisplay :: IORef Control -> IORef RenderState -> IORef ViewState -> IORef world -> (world -> [[Color]]) -> IO () |
The graphics library calls back on this function when it needs to redraw the window.
|
|
callbackIdle :: IORef Control -> IORef world -> (world -> world) -> IO () |
The graphics library calls back on this function when it's finished drawing
and it's time to do some computation.
|
|
Produced by Haddock version 0.7 |