| PADDLE_DISTANCE = 30 | |
| class Paddle(Turtle): | |
| def __init__(self, coordinates): | |
| super().__init__() | |
| self.shape("square") | |
| self.shapesize(stretch_len=PADDLE_SIZE) | |
| self.color("white") | |
| self.speed("fastest") | |
| self.setheading(90) | |
| self.penup() | |
| self.goto(coordinates) | |
| def up(self): | |
| if self.ycor() > 240: | |
| pass | |
| else: | |
| self.forward(PADDLE_DISTANCE) | |
| def down(self): | |
| if self.ycor() < -240: | |
| pass | |
| else: | |
| self.backward(PADDLE_DISTANCE) | |