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

Method left

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

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

(self)

Source from the content-addressed store, hash-verified

62 self.head.setheading(DOWN)
63
64 def left(self):
65 """Turns the snake's head to the left, preventing it from reversing."""
66 if self.head.heading() != RIGHT:
67 self.head.setheading(LEFT)
68
69 def right(self):
70 """Turns the snake's head to the right, preventing it from reversing."""

Callers 10

colour spiral.pyFile · 0.80
heart_redFunction · 0.80
Turtle_Star.pyFile · 0.80
draw_rectangleMethod · 0.80
draw_triangleMethod · 0.80
treeFunction · 0.80
snowflakeFunction · 0.80
create_buttonFunction · 0.80
handle_snake_leftFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected