Commit 317380bb by BellCodeEditor

auto save

parent 91866755
Showing with 9 additions and 6 deletions
......@@ -12,6 +12,7 @@ food=pygame.image.load("apple.png")
body=pygame.image.load("body.png")
x,y=240,120
positon=[(180,90),(180,120),(210,120),(x,y)]
# 创建一个窗口
screen=pygame.display.set_mode((660,480))
while True:
......@@ -20,12 +21,14 @@ while True:
exit()
x+=30
positon.append((x,y))
positon.pop(0)
screen.blit(background,(0,0))
screen.blit(right,(x,y))
screen.blit(body,(210,120))
screen.blit(body,(180,120))
screen.blit(body,(180,90))
screen.blit(right,positon[-1])
for i in range(len(positon)-1):
screen.blit(body,positon[i])
screen.blit(food,(360,300))
pygame.display.update()
FPSCLOCK.tick(15)
FPSCLOCK.tick(4)
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