Due: Tuesday 12/17 10:00am
Submission name: work32.nlogo
Write a NetLogo program with the following Features:
Example: http://homer.stuy.edu/~dw/netlogo/work32_obf.html
- Interface
- A slider called
numColors
- Should start at 1 and go to 14
- Monitors to show the number of patches for each true NetLogo color.
- Include buttons for each procedure listed below
- A slider called
- Procedures
setup
: observer- Have every patch set its color to a random color.
- The number of colors should be based on the
numColors
slider. - The possible colors should be the “true” NetLogo colors (i.e. 5, 15, 25, …).
setupEqual3
: observer- Have every patch set its color to either
gray
,red
ororange
. - The colors should be randomly chosen, but there should be exactly the same number of patches for each color.
- Have every patch set its color to either
setupEqual
: observer- Have every patch set its color to a random color.
- The number of colors should be based on the
numColors
slider. - The possible colors should be the “true” NetLogo colors (i.e. 5, 15, 25, …).
- The colors should be randomly chosen, but there should be exactly the same number of patches for each color (if the number of colors does not evenly divide the number of patches, then any leftover patches should be black).