Commit fc92b3d5 by BellCodeEditor

save project

parent c222b7f4
Showing with 5 additions and 3 deletions
...@@ -51,12 +51,14 @@ while True: ...@@ -51,12 +51,14 @@ while True:
else: else:
y+=30 y+=30
if x==a_x and y==a_y: if x==a_x and y==a_y:
a=random.randint(0,22) a=random.randint(0,21)
b=random.randint(0,12) b=random.randint(0,11)
a_x=a*30 a_x=a*30
a_y=b*30 a_y=b*30
else:
zuo.pop(0)
zuo.append((x,y)) zuo.append((x,y))
zuo.pop(0)
screen.blit(background, (0, 0)) screen.blit(background, (0, 0))
# 将贪吃蛇画上去 # 将贪吃蛇画上去
screen.blit(xiang,zuo[-1] ) screen.blit(xiang,zuo[-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