Turns the snake's head upwards, preventing it from reversing.
(self)
| 52 | self.head = self.segments[0] |
| 53 | |
| 54 | def up(self): |
| 55 | """Turns the snake's head upwards, preventing it from reversing.""" |
| 56 | if self.head.heading() != DOWN: |
| 57 | self.head.setheading(UP) |
| 58 | |
| 59 | def down(self): |
| 60 | """Turns the snake's head downwards, preventing it from reversing.""" |
no outgoing calls
no test coverage detected