Commit 0f6a605c by BellCodeEditor

save project

parent 5d4cd5cb
Showing with 7 additions and 15 deletions
......@@ -15,20 +15,8 @@ body = pygame.image.load('body.png')
x=240
y=120
poor=[(,),(,),(,),(,)]
FPSCLOCK=pygame.time.Clock()
while True:
for event in pygame.event.get():
......@@ -36,7 +24,9 @@ while True:
# 接收到退出事件后退出程序
exit()
x+=30
# 将背景图画上去
poor.append((x,y))
poor.pop(0)
#图画上去
screen.blit(background, (0, 0))
# 将贪吃蛇画上去
screen.blit(right, (x, y))
......@@ -47,4 +37,6 @@ while True:
# 将果实画上去
screen.blit(food, (360, 300))
# 刷新画面
FPSCLOCK.tick(1.1)
pygame.display.update()
for poor
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