Due: Tuesday 12/23 10:00am
Submission name: work29.nlogox
Write a NetLogo program like this:
patchRow
- All patches with
pxcorof-1should be given a random color. - All other patches with negative
pxcorvalues should be the same color as the patch at (-1,pycor). - All the patches with positive
pxcorvalues 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
randomBGswitch istrue, 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
waitto slow down movement.