Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
pygame_lesson1_2
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
ff5e871c
authored
Sep 15, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
a9805961
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
8 deletions
__pycache__/log.cpython-37.pyc
log.py
snake.py
__pycache__/log.cpython-37.pyc
View file @
ff5e871c
No preview for this file type
log.py
View file @
ff5e871c
...
@@ -19,12 +19,12 @@ class log:
...
@@ -19,12 +19,12 @@ class log:
def
seet_log
(
self
,
key
):
def
seet_log
(
self
,
key
):
return
self
.
log
[
key
]
return
self
.
log
[
key
]
def
all_log
(
self
,
sep
):
def
all_log
vul
(
self
,
sep
=
","
):
return_
log
=
""
return_
r
=
""
for
i
in
self
.
log
:
for
i
in
self
.
log
:
return_
log
=
return_log
+
i
return_
r
=
return_r
+
i
return_
log
=
return_log
+
sep
return_
r
=
return_r
+
sep
return
return_
log
return
return_
r
[
0
:
len
(
return_r
)
-
len
(
sep
)]
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
print
(
'log 1.0.0
\n
Hello from the log community.'
)
print
(
'log 1.0.0
\n
Hello from the log community.'
)
\ No newline at end of file
snake.py
View file @
ff5e871c
...
@@ -13,10 +13,11 @@ win_log.att_log("窗口创建","成功")
...
@@ -13,10 +13,11 @@ win_log.att_log("窗口创建","成功")
bg
=
pg
.
image
.
load
(
"bg.png"
)
bg
=
pg
.
image
.
load
(
"bg.png"
)
right
=
pg
.
image
.
load
(
"right.png"
)
right
=
pg
.
image
.
load
(
"right.png"
)
body1
=
pg
.
image
.
load
(
"body.png"
)
food
=
pg
.
image
.
load
(
"apple.png"
)
food
=
pg
.
image
.
load
(
"apple.png"
)
win_log
.
att_log
(
"素材创建"
,
"成功"
)
win_log
.
att_log
(
"素材创建"
,
"成功"
)
print
(
win_log
.
all_log
(
","
))
print
(
win_log
.
all_log
vul
(
))
while
True
:
while
True
:
for
event
in
pg
.
event
.
get
():
for
event
in
pg
.
event
.
get
():
...
@@ -24,4 +25,6 @@ while True:
...
@@ -24,4 +25,6 @@ while True:
exit
()
exit
()
win
.
blit
(
bg
,
(
0
,
0
))
win
.
blit
(
bg
,
(
0
,
0
))
win
.
blit
(
right
,
(
290
,
120
))
win
.
blit
(
right
,
(
290
,
120
))
win
.
blit
(
food
,
(
360
,
300
))
win
.
blit
(
body1
,
(
260
,
120
))
\ No newline at end of file
win
.
blit
(
food
,
(
360
,
300
))
pg
.
display
.
update
()
\ 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