Adds a new segment to the snake's tail.
(self)
| 31 | self.segments.append(new_segment) |
| 32 | |
| 33 | def extend(self): |
| 34 | """ Adds a new segment to the snake's tail. """ |
| 35 | self.add_segment(self.segments[-1].position()) |
| 36 | self.segments[0].color(colors.FIRST_SEGMENT_COLOR) |
| 37 | |
| 38 | def move(self): |
| 39 | """ Moves the snake forward by moving each segment to the position of the one in front.""" |
no test coverage detected