Work 21: 11/2

posted Nov 2, 2018, 10:57 AM by JonAlf Dyrland-Weaver   [ updated Nov 2, 2018, 11:06 AM ]
With your new table buddy, try to recreate the procedures in the following NetLogo program: http://homer.stuy.edu/~dw/netlogo/colorPatchesWeb.html
  1. Phase 1: TO BE DONE BEFORE ANY CODING!
    • Test the buttons out
      • ca is just there for convenience.
    • Using a Key To Success™, answer the following questions:
      • For colorQuad
        • What is true about all the purple patches? 
        • What is true about all the  blue patches?
        • What can you say about all the white patches?
      • For grid
        • What is the difference between the black and white patches?
      • What is the difference between colorRandom and colorRandom2?
      • To answer the following questions, you'll need to test in netlogo
        • How can you tell the coordinates of a patch?
        • There is an arithmetic operator in netlogo called mod. It is used as follows:
          • a mod b - where a and b are both integers (and b != 0).
        • What does mod do?
  2. Phase 2:
    1. Use the info you gathered in Phase 1 to write your own version of the program.
    2. You do not need to use the same exact colors I do, but the colors you choose must behave in the same way they do in my version.
    3. Include your answers to the questions from phase 1 as comments at the top of your code.
      1. Like racket, ; is the NetLogo comment operator.
Submit this as color_patches
(if you want to fix up your crazy_turtles assignment over the weekend, you may do so with no late penalty)
Comments