Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
pygame_lesson9_diy4
This project
Loading...
Sign in
Toggle navigation
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
21e82600
authored
Dec 26, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
e0b818b5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
3 deletions
my_game.py
record.txt
my_game.py
View file @
21e82600
...
@@ -137,7 +137,7 @@ while True:
...
@@ -137,7 +137,7 @@ while True:
elif
score
>
three
:
elif
score
>
three
:
conDin
[
"第3名"
]
=
score
conDin
[
"第3名"
]
=
score
with
open
(
'record.txt'
,
'w'
,
encoding
=
'utf-8'
)
as
f
:
with
open
(
'record.txt'
,
'w'
,
encoding
=
'utf-8'
)
as
f
:
txt
=
json
.
dumps
(
conDi
c
,
ensure_ascii
=
True
)
txt
=
json
.
dumps
(
conDi
n
,
ensure_ascii
=
True
)
f
.
write
(
txt
)
f
.
write
(
txt
)
else
:
else
:
if
sprite
.
rect
.
x
+
sprite
.
rect
.
width
<
wukong
.
rect
.
x
:
if
sprite
.
rect
.
x
+
sprite
.
rect
.
width
<
wukong
.
rect
.
x
:
...
...
record.txt
View file @
21e82600
{"第1名": 0, "第2名": 0, "第3名": 0}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment