Commit 69e467e2 by BellCodeEditor

auto save

parent 7145e4ed
Showing with 2 additions and 0 deletions
...@@ -42,6 +42,7 @@ while True: ...@@ -42,6 +42,7 @@ while True:
snake_head = down snake_head = down
# 设置贪吃蛇的头部坐标 # 设置贪吃蛇的头部坐标
if x <
if setheading == "right": if setheading == "right":
x += 30 x += 30
elif setheading == "left": elif setheading == "left":
...@@ -54,6 +55,7 @@ while True: ...@@ -54,6 +55,7 @@ while True:
if x == pingguox and y == pingguoy: if x == pingguox and y == pingguoy:
pingguox = randint(1,22)*30-30 pingguox = randint(1,22)*30-30
pingguoy = randint(1,16)*30-30 pingguoy = randint(1,16)*30-30
score += 200
else: else:
position.pop(0) position.pop(0)
# 将背景图画上去 # 将背景图画上去
......
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