Commit b26aa4c7 by BellCodeEditor

save project

parent 5f31d09c
Showing with 6 additions and 4 deletions
......@@ -9,16 +9,18 @@ headright=pygame.image.load("right.png")
apple=pygame.image.load('apple.png')
body=pygame.image.load('body.png')
x,y=240,120
e=[(180,90),(180,120),(210,120),(x,y)]
while True:
for event in pygame.event.get():
if event.type==locals.QUIT:
exit()
x+=30
e.append((x,y))
e.pop(0)
screen.blit(background,(0,0))
screen.blit(headright,(x,y))
screen.blit(body,(210,120))
screen.blit(body,(180,120))
screen.blit(body,(180,90))
screen.blit(headright,e[-1])
for i in range(len(e)-1):
screen.blit(body,e[i])
screen.blit(apple,(360,300))
pygame.display.update()
q.tick(3)
......
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