Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

Administrator / pygame_lesson9_diy4

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Commit 0d064b75 authored 2 years ago by BellCodeEditor's avatar BellCodeEditor
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

save project

parent 2cf78f21
Hide whitespace changes
Inline Side-by-side
Showing with 12 additions and 2 deletions
  • my_game.py
  • score.txt
my_game.py
View file @ 0d064b75
...@@ -135,6 +135,16 @@ while True: ...@@ -135,6 +135,16 @@ while True:
road_x=0 road_x=0
if bg_x<=-1000: if bg_x<=-1000:
bg_x=0 bg_x=0
if defen > three:
if defen>one:
duqu2["第3名"]=two
duqu2["第2名"]=one
duqu2["第1名"]=defen
elif defen>two:
duqu2["第3名"]=two
duqu2["第2名"]=defen
else:
duqu2["第3名"]=defen
text2 = ziti.render('第一名:'+str(duqu2["第1名"]),True,(255,255,255)) text2 = ziti.render('第一名:'+str(duqu2["第1名"]),True,(255,255,255))
screen.blit(text2,(850,30)) screen.blit(text2,(850,30))
text3 = ziti.render('第二名:'+str(duqu2["第2名"]),True,(255,255,255)) text3 = ziti.render('第二名:'+str(duqu2["第2名"]),True,(255,255,255))
......
This diff is collapsed. Click to expand it.
score.txt
View file @ 0d064b75
{"第1名": 0, "第2名": 0, "第3名": 0} {"第1名": 1, "第2名": 1, "第3名": 0}
\ No newline at end of file \ No newline at end of file
This diff is collapsed. Click to expand it.
  • Write
  • Preview
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