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
0c2577d1
authored
Oct 22, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
355782b0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
26 deletions
snake.py
snake.py
View file @
0c2577d1
import
pygame
我觉得萨努还行吧过氧化钠洒下牛仔裤
OPJC
级(蹴鞠
if
所说的倒计时办公室你还差
dwgnsakjxiosasdfEgimdmscmfn8dnxhfuernewhcvwenuycfehrfskzdksjudnh
年度与父母四点出发
vrehtnfidjsifh8smfnuhrhwedfuewtierjfkdsfsZretureidfju7rt5eyt
ernfcfheywnfdsfv
)
sdyns87ycwebt68weabv9ygfdbbved7yfggtrt
from
pygame
import
locals
\ No newline at end of file
pygame
.
init
()
s
=
pygame
.
display
.
set_mode
((
660
,
480
))
f
=
pygame
.
time
.
Clock
()
q
=
pygame
.
image
.
load
(
'bg.png'
)
t
=
pygame
.
image
.
load
(
'apple.png'
)
r
=
pygame
.
image
.
load
(
'right.png'
)
b
=
pygame
.
image
.
load
(
'body.png'
)
x
=
240
y
=
120
while
True
:
for
a
in
pygame
.
event
.
get
():
if
a
.
type
==
locals
.
QUIT
:
exit
()
x
+=
30
s
.
blit
(
q
,(
0
,
0
))
s
.
blit
(
t
,(
360
,
300
))
s
.
blit
(
r
,(
x
,
y
))
s
.
blit
(
b
,(
210
,
120
))
s
.
blit
(
b
,(
180
,
120
))
s
.
blit
(
b
,(
150
,
120
))
f
.
tick
(
1.5
)
pygame
.
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