في كلا التطبيقين لا تظهر لوحة التحكم او الأزرار
from turtle import Turtle, Screen
import random
from padel import Padel
class Gamepadel(Turtle):
def init(self):
super().init()
self.color(“white”)
self.shape(“square”)
self.shapesize(stretch_wid=5, stretch_len=1)
self.penup()
self.goto(-200, 0)
screen = Screen()
screen.setup(width=500, height=400)
screen.bgcolor(“black”)
padel=Padel()
screen.listen()
screen.onkey(padel.p_left, “s”)
screen.onkey(padel.p_right, “l”)
screen.exitonclick()
Screen
class Padel(Turtle):
def init(self):
super().init()
self.shape(“square”)
self.color(“white”)
self.shapesize(1,5)
self.penup()
self.goto(x=0, y= -190)
def p_right(self):
self.goto(self.xcor()+20, self.ycor())
def p_left(self):
self.goto(self.xcor()-20, self.ycor())