Due: Monday 1/5 10:00am
Submission name: work30.nlogox
Write a NetLogo program like this:
Interface
- colors: slider, [1, 14]
- neighborsOnly: switch
- Plot showing how many patches are of each true NetLogo colors.
setup
- Clears the screen.
- Resets ticks (
reset-ticks) - Make every patch one of the true NetLogo colors (based of colors slider), with as equal distribution as possible.
tick
colorSwap
- This should be an observer procedure.
- Wait a short amount of time.
- Have every patch change their color to the color of a different randomly selected patch.
one-of AGENTSETwill return a randomly selected agent from the provided set.
- If
neighborsOnlyis on, then the color should be chosen from a randomly selected neighbor. tick