Turns the snake's head downwards, preventing it from reversing.
(self)
| 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.""" |
no outgoing calls
no test coverage detected