Commit d9611258 by BellCodeEditor

auto save

parent 0d661c2b
Showing with 3 additions and 1 deletions
...@@ -43,7 +43,9 @@ while True: ...@@ -43,7 +43,9 @@ while True:
if event.key == locals.K_DOWN and setheading != "up": if event.key == locals.K_DOWN and setheading != "up":
setheading = 'down' setheading = 'down'
snake_head = down snake_head = down
if x == apple_x and y == apple_y:
apple_x = rangom.randint(0,660)
apple_y = random.randint(0,480)
# 设置贪吃蛇的头部坐标 # 设置贪吃蛇的头部坐标
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