2014-12-08 Lab

posted Dec 8, 2014, 6:33 AM by Samuel Konstantinovich   [ updated Dec 8, 2014, 6:33 AM ]
Labs MUST be finished at home if not completed in class. 

Goal: Patches

1. Make a setup function that changes the patch color of the world based on their locations. The top third of the world should be white, the middle third should be red, and the bottom third should be black. (3 horizontal stripes of color)
hint: How big is the default world?

2. Make a go command that makes each individual patch have a chance to change to yellow.
white patches have a 1% chance
red: 5% chance
black: 10% chance
(do not make this a forever button)

3. If you change your max-pycor then the code you wrote may not work. How can you change your code to work with any world size? (with the origin in the middle)
- Come up with a formula to help you apply your setup to any size world.

4. Change your world size to test, make your patches smaller to compensate for larger world sizes.