MCPcopy Index your code
hub / github.com/geekcomputers/Python / right

Method right

Snake Game Using Turtle/snake.py:69–72  ·  view source on GitHub ↗

Turns the snake's head to the right, preventing it from reversing.

(self)

Source from the content-addressed store, hash-verified

67 self.head.setheading(LEFT)
68
69 def right(self):
70 """Turns the snake's head to the right, preventing it from reversing."""
71 if self.head.heading() != LEFT:
72 self.head.setheading(RIGHT)
73

Callers 6

Turtle_Star.pyFile · 0.80
treeFunction · 0.80
snowflakeFunction · 0.80
koch curve.pyFile · 0.80
handle_snake_rightFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected