Open main menu
Home
Random
Log in
Settings
About Sugar Labs
Disclaimers
Sugar Labs
Search
Changes
← Older edit
Newer edit →
Activities/Turtle in a Pond
(view source)
Revision as of 16:20, 1 December 2011
152 bytes removed
,
16:20, 1 December 2011
→Strategy
Line 130:
Line 130:
def _turtle_strategy(self, turtle):
def _turtle_strategy(self, turtle):
dots = self._surrounding_dots(turtle)
dots = self._surrounding_dots(turtle)
−
for i in range(6):\n\
−
if self._dots[dots[i]].type is None:
−
self._orientation = i
−
return self._dot_to_grid(dots[i])
−
dots_ordered_by_weight = self._ordered_weights(turtle)
dots_ordered_by_weight = self._ordered_weights(turtle)
for i in range(6):
for i in range(6):
Walter
Bureaucrats
,
Administrators
10,579
edits