In this homework you are to write a Netlogo program that simulates the behavior of a turtle as it wanders around the enclosure in search of the green bits of food. If it finds a food item it eats it. Your program should move the animal until it eats all of the grass. You can put more grass than that inside of the fence if you desire.
You need to create the following interface
- a grassct slider to set the number of grass nodules.
- setup button that clears the screen and creates a turtle that is colored white and has shape “turtle”
- draw-fence button that uses a turtle to draw a fence in blue
- grass button adds ten random grass patches inside of the fence.
- wander button has the turtle run around the enclosure eating grass. When the grass is gone have it stop the program. The main issue here is that it should change direction toward the center when it encounters the fence so it won’t escape.
More credit: Add any other cool feature you can think of.