Commit c7082ee8 by BellCodeEditor

save project

parent a7b98d82
Showing with 3 additions and 0 deletions
...@@ -50,8 +50,11 @@ while True: ...@@ -50,8 +50,11 @@ while True:
num2=random.randint(1,16) num2=random.randint(1,16)
apple_x=num1*30-30 apple_x=num1*30-30
apple_y=num2*30-30 apple_y=num2*30-30
score+=10
else: else:
position.pop(0) position.pop(0)
if x<0 or x>630 or y<0 or y>480:
exit()
# 设置贪吃蛇的头部坐标 # 设置贪吃蛇的头部坐标
if setheading == "right": if setheading == "right":
x += 30 x += 30
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment