Work 28: 11/30

posted Nov 30, 2018, 11:42 AM by JonAlf Dyrland-Weaver   [ updated Nov 30, 2018, 12:30 PM ]
  1. Pick 2 colors you like, call one of those colors "on" and the other "off".
  2. Give patches a property, we will use it later on to keep track of how many neighbors are "on".
  3. Create a setup procedure that:
    1. Clears everything
    2. Sets all patches to the "off" state.
    3. Puts a 2x2 square of patches located near the center in the "on" state.
  4. Create a go procedure that does the following:
    1. Every patch should keep track of the number of neighbors that are "on" in the property declared in step 2.
    2. After every patch has completed step 1:
      1. If a patch is "off" and the number of "on" neighbors is  in the range [2,4], the patch should turn "on".
      2. If a patch is "on", it should turn "off"
submit this as tapestry
Comments