Commit 817aaba7 by BellCodeEditor

save project

parent e220b56e
Showing with 6 additions and 3 deletions
......@@ -51,10 +51,13 @@ while True:
# 将背景图画上去
if x==applex and y==appley:
appley=random.randint(0,480)
applex=random.randint(0,660)
pos.append((x,y))
num1=random.randint(1,16)
num2=random.randint(0,22)
applex=num2*30-30
appley=num1*30-30
else:
pos.pop(0)
pos.append((x,y))
screen.blit(background, (0, 0))
# 将贪吃蛇画上去
screen.blit(right,pos[-1])
......
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