Smell something smoky? Take a look at this forest fire.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/e2ef5b9d-af75-426f-8274-ff486769d328/forest_fire.gif

Creating a forest fire

Let's go ahead and format our new NetLogo code the same way:

Recall what each of the keywords are doing!

❓ What does to and end mean?

❓ What is clear-all doing?

❓ What is setup and go?

reset-ticks is new. We'll discuss this soon.

to setup
	clear-all
	reset-ticks
end

to go
 ; we will fill this in later
end

Patches

See page below for more info about patches! Patches are important, so it deserves its own page.

Patches

Creating a Forest

Let's use some command to make a forest and make the entire world green!

⁉️ Hold up. Forests aren't all trees...

We need some way for some of the patches to be green, while the other stay black. Sometimes there's random dirt or rocks where fires shouldn't spread.

How should we address this?

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/dfcca250-657f-402e-adcf-b0bc38405af0/Untitled.png

Randomness

In the command center:

> show random 6

Random numbers are super useful. Imagine you played a game that was the exact same every time: that wouldn't be any fun at all. Our world is filled with random things that random people do that have random results. Randomness is essential to building NetLogo models!