MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / reset

Method reset

Python/Turtle.py:1100–1110  ·  view source on GitHub ↗

Reset all Turtles on the Screen to their initial state. No argument. Example (for a TurtleScreen instance named screen): >>> screen.reset()

(self)

Source from the content-addressed store, hash-verified

1098 self._colormode = int(cmode)
1099
1100 def reset(self):
1101 """Reset all Turtles on the Screen to their initial state.
1102
1103 No argument.
1104
1105 Example (for a TurtleScreen instance named screen):
1106 >>> screen.reset()
1107 """
1108 for turtle in self._turtles:
1109 turtle._setmode(self._mode)
1110 turtle.reset()
1111
1112 def turtles(self):
1113 """Return the list of turtles on the screen.

Callers 1

modeMethod · 0.95

Calls 2

_setmodeMethod · 0.80
resetMethod · 0.45

Tested by

no test coverage detected