import turtle as t playerAscore=0 playerBscore=0 window=t.screen() window.title("miyu game") window.bgcolor("blue") window.setup(width=800,height=600) window.tracer(0) #creating left paddle leftpaddle=t.Turtle leftpaddle.speed(0) leftpaddle.shape("square") leftpaddle.color("white") leftpaddle.shapesize(stretch_wid=5,stretch_len=1) leftpaddle.penup() rightpaddle.goto(350,0) #creating ball ball=t.turtle() ball.speed(0) ball.shape=("circle") ball.color("red") ball.goto(5,5) ballxdirection=0.2 ballydirection=0.2 pen=t.turtle() pen.speed(0) pen.color("blue") pen.hideturtle() pen.goto(0,260) pen.write("score", align="center") #moving the leftpaddle def leftpaddleup(): y=leftpaddle.ycor() ...
Home/python game