Finishing up
The final part of Project 1 just connects the simulation and simple-model
pieces into a couple of functions.
The first of these functions is a wrapper for the simulate
function from
the grid.rkt
module.
(: run-simple-model : (Listof Simple-Init-Cell) Natural Natural Natural -> Simple-Grid)
This function takes a list of initial cell values, the number of rows and columns in the grid, and the time limit. It runs the simulation using the simple model and returns the final grid.
The second function is similar, but also takes the cell radius and the tick rate as parameters. It runs the animated simulation using the simple model and simple render information.
(: animate-simple-model :
(Listof Simple-Init-Cell) Natural Natural Natural Integer Positive-Real
-> Simple-Grid)