Commit 4270cf99 by BellCodeEditor

save project

parent 30829f26
Showing with 4 additions and 3 deletions
......@@ -53,9 +53,10 @@ while True:
x+=30
snake.append((x,y))
if x==apple_x*30 and y==apple_y*30:
apple_x=random.randint(0,22)
apple_y=random.randint(0,16)
snake.pop(0)
apple_x=random.randint(0,21)
apple_y=random.randint(0,15)
else:
snake.pop(0)
# 将贪吃蛇的身体画上去
screen.blit(background, (0, 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