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
afdbf785
authored
Jun 18, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
c6188a1e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
4 deletions
bie yong wo de.py
eeeee.py
snake.py
ta.py
bie yong wo de.py
0 → 100644
View file @
afdbf785
#别用我的,谢谢,别删,你可以新建。十分感谢。。。。你也可以用其他的、
import
turtle
screen
=
turtle
.
screen
()
screen
.
bgcolor
(
"light blue"
)
pen
=
turtle
.
Pen
()
pen
.
penup
()
pen
.
goto
(
100
,
-
100
)
pen
.
write
(
"hi,诺一
\n
我也喜欢
\n
---悟空"
,
font
=
(
"Times"
,
20
,
"narmal"
))
pen
.
hideturtle
()
pen
=
turtle
.
Pen
()
pen
.
pencolor
(
"red"
)
pen
.
pensize
(
5
)
pen
.
left
(
45
)
pen
.
forward
(
100
)
pen
.
circle
(
50
,
180
)
pen
.
right
(
90
)
pen
.
circle
(
50
,
180
)
pen
.
forward
(
100
)
pen
.
hideturtle
()
turtle
.
done
()
\ No newline at end of file
eeeee.py
0 → 100644
View file @
afdbf785
snake.py
View file @
afdbf785
import
pygame
from
pygame
import
locals
:
# 初始化pygame,为使用pygame做准备
pygame
.
init
()
pygame
.
init
()
# 创建一个窗口
??
\ No newline at end of file
screen
=
pygame
.
display
.
set_mode
((
640
,
480
))
background
=
pygame
.
image
.
load
(
"bg.png"
)
right
=
pygame
.
image
.
load
(
"right.png"
)
boby
=
pygame
.
image
.
load
(
"boby.png"
)
food
=
pygame
.
image
.
load
(
"food.png"
)
while
True
:
for
event
in
pygame
.
event
.
get
():
if
event
.
type
==
locals
.
QUIT
:
exit
()
screen
=
blit
(
background
(
0
,
0
))
screen
=
blit
(
food
(
0
,
0
))
screen
=
blit
(
food
(
0
,
480
))
screen
=
blit
(
food
(
630
,
0
))
screen
=
blit
(
food
(
630
,
480
))
pygame
,
display
.
update
()
\ No newline at end of file
ta.py
0 → 100644
View file @
afdbf785
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