Commit 49564e86 by BellCodeEditor

save project

parent 1e84563a
Showing with 3 additions and 1 deletions
...@@ -54,13 +54,15 @@ while True: ...@@ -54,13 +54,15 @@ while True:
score=score+1 score=score+1
else: else:
s.pop(0) s.pop(0)
if x<0 or x>630 or y<0 or y>450:
exit()
screen.blit(bg,(0,0)) screen.blit(bg,(0,0))
screen.blit(tou,s[-1]) screen.blit(tou,s[-1])
screen.blit(apple,(apple_x,apple_y)) screen.blit(apple,(apple_x,apple_y))
for i in range(len(s)-1): for i in range(len(s)-1):
screen.blit(body,s[i]) screen.blit(body,s[i])
info="Score"+str(score) info="Score"+str(score)
text=my_font.render(info,True,(0,160,210)) text=my_font.render(info,True,(0,190,210))
screen.blit(text,(540,10)) screen.blit(text,(540,10))
pygame.display.update() pygame.display.update()
FPSCLOCK.tick(6) FPSCLOCK.tick(6)
......
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