热门

最新

红包

立Flag

投票

同城

我的

发布
weixin_53014583
bhnksdvijsoce
5 年前
trueweixin_53014583

最后部分:
if 球1.distance(玩家)<1:
球1.hideturtle()
球1.goto(random.randint(-500,500),400)
球1.showturtle()
s=s+1
if 球2.distance(玩家)<1:
s=s+1
球2.hideturtle()
球2.goto(random.randint(-500,500),400)
球2.showturtle()
if 球3.distance(玩家)<1:
s=s+1
球3.hideturtle()
球3.goto(random.randint(-500,500),400)
球3.showturtle()
if 球4.distance(玩家)<1:
s=s+1
球4.hideturtle()
球4.goto(0,500)
球4.showturtle()
if 球5.distance(玩家)<1:
s=s+1
球5.hideturtle()
球5.goto(random.randint(-500,500),400)
球5.showturtle()
if 球6.distance(玩家)<1:
s=s+1
球6.hideturtle()
球6.goto(random.randint(-500,500),400)
球6.showturtle()
if 球7.distance(玩家)<1:
s=s+1
球7.hideturtle()
球7.goto(random.randint(-500,500),400)
球7.showturtle()

CSDN App 扫码分享
分享
评论
点赞
打赏
  • 复制链接
  • 举报
下一条:
剩余部分: 球8.goto(random.randint(-500,500),400) #设立球的位和形状 s=0 turtle.onkeypress(left,"Left") turtle.onkeypress(right,"Right") 球1.setheading(270) 球2.setheading(270) 球3.setheading(270) 球4.setheading(270) 球5.setheading(270) 球6.setheading(270) 球7.setheading(270) 球8.setheading(270) turtle.listen() while True: 球1.forward(10) 球2.forward(10) 球3.forward(10) 球4.forward(10) 球5.forward(10) 球6.forward(10) 球7.forward(10) 球8.forward(10) #让球下落
立即登录