Commit efec2d81 by BellCodeEditor

save project

parent 8db179cc
Showing with 14 additions and 0 deletions
......@@ -53,8 +53,15 @@ while True:
y -= 30
else:
y += 30
if x<0 or y<0 or y>450 or x>630:
exit()
if (x, y) in position:
exit()
position.append((x, y))
if x==apple_x and y==apple_y:
apple_x=random.randint(0,21)*30
......@@ -78,3 +85,10 @@ while True:
# 刷新画面
pygame.display.update()
FPSCLOCK.tick(3)
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