Commit a0c23413 by BellCodeEditor

save project

parent 35239e82
Showing with 15 additions and 2 deletions
...@@ -147,4 +147,17 @@ while True: ...@@ -147,4 +147,17 @@ while True:
screen.blit(scoresurf,(800,110)) screen.blit(scoresurf,(800,110))
# 刷新画面 # 刷新画面
pygame.display.update() pygame.display.update()
FPS.tick(60) FPS.tick(60)
\ No newline at end of file else:
if score>text['第1名']:
text['第1名']=score
text['第2名']=text1
text['第3名']=text2
elif score>text['第2名']:
text['第2名']=score
text['第3名']=text2
elif score>text['第3名']:
text['第3名']=score
history=json.dumps(text,ensure_ascii=False)
with open('record.txt','w',encoding='utf-8') as f:
f.write(history)
\ 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