Commit 62828beb by BellCodeEditor

save project

parent 16090efb
Showing with 6 additions and 1 deletions
......@@ -9,19 +9,24 @@ screen = pygame.display.set_mode((660, 480))
# 背景
background = pygame.image.load('bg.png')
right = pygame.image.load('right.png')
left = pygame.image.load('right.png')
right = pygame.image.load('right.png')
right = pygame.image.load('right.png')
food = pygame.image.load('apple.png')
body = pygame.image.load('body.png')
fps=pygame.time.Clock()
x,y=240,120
p=[(150,120),(180,120),(180,90),(x,y)]
s='right'
snake_head=right
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
# 接收到退出事件后退出程序
exit()
if event.type==locals.
x+=30
if s=='right'
x+=30
p.append((x,y))
p.pop(0)
# 将背景图画上去
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment