Commit 72bee209 by BellCodeEditor

save project

parent 754b9b54
Showing with 19 additions and 6 deletions
......@@ -8,15 +8,29 @@ right=pygame.image.load('right.png')
food=pygame.image.load('apple.png')
body=pygame.image.load('body.png')
screen=pygame.display.set_mode((660,480))
x,y=240,120
position=[(180,90),(180,120),(210,120),(x,y)]
FPSClock = pygame.time.Clock()
while True:
x+=30
position.append((x,y))
position.pop(0)
for i in range(len(position)-1):
screen.blit(body,position[i])
for event in pygame.event.get():
if event.type==locals.QUIT:
exit()
screen.blit(background,(0,0))
screen.blit(body,(180,120))
screen.blit(body,(210,120))
screen.blit(right,(240,120))
screen.blit(body,position[2])
screen.blit(body,position[1])
screen.blit(body,position[0])
screen.blit(right,position[3])
screen.blit(food,(360,300))
pygame.display.update()
\ No newline at end of file
pygame.display.update()
FPSClock.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