Activities/Turtle in a Pond: Difference between revisions
Tonyforster (talk | contribs) |
|||
| Line 34: | Line 34: | ||
if not self._dots[self._grid_to_dot((col, row))].type: | if not self._dots[self._grid_to_dot((col, row))].type: | ||
return [col, row] | return [col, row] | ||
return turtle | |||
</pre> | |||
In this version, the turtle moves down, regardless of whether the dot is open. | |||
<pre> | |||
def _turtle_strategy(self, turtle): | |||
turtle[1] +=1 | |||
return turtle | return turtle | ||
</pre> | </pre> | ||