Help Page: Help with the Script for Spreading DiseaseTo check if any healthy turtles are in the same patches as infected turtles, we need another test. There are 3 parts to this: 1) test whether each turtle is healthy; 2) if a turtle is healthy, test whether it is near an infected turtle; and 3) if a turtle is healthy and near an infected turtle, infect it. Step 1: Test if turtles are infected Step 2: Test if healthy turtles are near infected turtles The way to determine if it is in the same patch as an infected turtle is to look at the patch value; remember, we set the patch values where all infected turtles are to 1. Select “turtle1’s patchValueIn” from the “kedama turtle” menu again. This time, we are checking if the patch’s value is one. |
![]() |
| If the patchValueIn equals 1, then we need to infect the healthy turtle1. Step 3: Infecting healthy turtles |