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
3da41295
authored
Sep 15, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
977d87d2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
2 deletions
__init__.py
__pycache__/log.cpython-37.pyc
log.py
snake.py
__init__.py
0 → 100644
View file @
3da41295
__pycache__/log.cpython-37.pyc
0 → 100644
View file @
3da41295
File added
log.py
0 → 100644
View file @
3da41295
class
log
:
def
__init__
(
self
):
self
.
log
=
{}
self
.
lognum
=
0
def
att_log
(
self
,
log_key
,
log_word
):
self
.
lognum
=
self
.
lognum
+
1
self
.
log
[
log_key
]
=
log_word
\ No newline at end of file
snake.py
View file @
3da41295
import
pygame
as
pg
import
pygame
as
pg
from
log
import
log
# 初始化pygame,为使用pygame做准备
# 初始化pygame,为使用pygame做准备
pg
.
init
()
pg
.
init
()
# 创建一个窗口
# 创建一个窗口
win
=
pg
.
display
.
set_mode
((
800
,
600
))
win
=
pg
.
display
.
set_mode
((
800
,
600
))
print
(
win
)
win_log
=
log
()
\ 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