Due: Wednesday 12/18 10:00am

Write a NetLogo program like this:

patchRow

  • All patches with pxcor of -1 should be given a random color.
  • All other patches with negative pxcor values should be the same color as the patch at (-1, pycor).
  • All the patches with positive pxcor values should have the color of the patch on the opposite side (in both x and y).
    • i.e. patch 5 10 should have the same color as patch -5 -10

setup

  • Clears the screen.
  • Creates 1 turtle.
  • If the randomBG switch is true, have all the patches become the same randomly chosen color (out of all possible NetLogo colors).

go

  • Have a turtle move around randomly. As it moves, its neighboring patches should change color. At any given time, only the neighboring patches should be different from the rest of the patches.
  • Assume this procedure runs in a world where all patches start out the same color.
  • Use wait to slow down movement.