Commit fbf40d32 by BellCodeEditor

save project

parent cf22b5c1
Showing with 7 additions and 4 deletions
......@@ -56,12 +56,15 @@ while True:
else:
y-=30
z.append((x,y))
if apple_x==x and apple_y==y:
apple_x=random.randint(0,660)
apple_y=random.randint(0,480)
a_x=random.randint(0,21)
a_y=random.randint(0,15)
apple_x=a_x*30
apple_y=a_y*30
else:
z.pop(0)
z.append((x,y))
# 将背景图画上去
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