Commit 4270cf99 by BellCodeEditor

save project

parent 30829f26
Showing with 3 additions and 2 deletions
......@@ -53,8 +53,9 @@ 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)
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