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

8. The Forest: Part One

Beau Nouvelle1 
(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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.