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

Method down

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

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

(self)

Source from the content-addressed store, hash-verified

57 self.head.setheading(UP)
58
59 def down(self):
60 """Turns the snake's head downwards, preventing it from reversing."""
61 if self.head.heading() != UP:
62 self.head.setheading(DOWN)
63
64 def left(self):
65 """Turns the snake's head to the left, preventing it from reversing."""

Callers 2

triangleFunction · 0.80
handle_snake_downFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected