© Beau Nouvelle 2019
Beau NouvelleSimulations in Swift 5https://doi.org/10.1007/978-1-4842-5337-3_8

8. The Forest: Part One

Beau Nouvelle
(1)
Victoria, Australia
 
In the previous chapter, we created a world full of cells. We made it possible for them to be in one of two states—dead or alive. This time around we’ll be replacing the states with types and augmenting them with some protocol-oriented programming.
We’ll also be rebuilding our grid system to something that is much easier to manage. This new system will be more efficient than previous versions, allowing us to generate even larger worlds.
There is no main goal here, we’re not replicating somebody else’s system, so we will not worry about specific steps or rules. This simulation is ours to build ...

Get Simulations in Swift 5: Design and Implement with Swift Playgrounds now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.