Activities/Turtle in a Pond: Difference between revisions

Line 27: Line 27:
<pre>
<pre>
def _turtle_strategy(self, turtle):
def _turtle_strategy(self, turtle):
     turtle[1] +=1
     turtle[1] += 1
     return turtle
     return turtle
</pre>
</pre>
Line 35: Line 35:
def _turtle_strategy(self, turtle):
def _turtle_strategy(self, turtle):
     if not self._dots[self._grid_to_dot((turtle[0], turtle[1]+1))].type:
     if not self._dots[self._grid_to_dot((turtle[0], turtle[1]+1))].type:
       turtle[1] +=1
       turtle[1] += 1
     return turtle
     return turtle
</pre>
</pre>