Commit 1a734c06 by BellCodeEditor

save project

parent 42c8fd2a
Showing with 5 additions and 1 deletions
......@@ -60,6 +60,7 @@ while True:
C2=random.randint(1,16)
apple_x=C1*30-30
apple_y=C2*30-30
score+=10
else:
position.pop(0)
position.append((x, y))
......@@ -78,6 +79,8 @@ while True:
info="score"+str(score)
text=my_font.render(info,True,(0,0,0))
screen.blit(text,(540,10))
# 刷新画面
if x<0 or x>630 or y<0 or y>450:
exit()
# 刷新 画面
pygame.display.update()
FPSCLOCK.tick(3)
\ No newline at end of file
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