Commit aa675ca1 by BellCodeEditor

save project

parent f294bf1f
Showing with 12 additions and 9 deletions
......@@ -3,20 +3,23 @@ from pygame import locals
pygame.init()
screen = pygame.display.set_mode((660,580))
FPSCLOCK = pygame.time.Clock()
background = pygame.image.load('bg.png')
head = pygame.image.load('right.png')
food = pygame.image.load('apple.png')
body = pygame.image.load('body.png')
x,y = 120,90
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
exit()
x += 30
screen.blit(background,(0,0))
screen.blit(head,(30,0))
screen.blit(food,(330,0))
screen.blit(body,(0,0))
screen.blit(body,(0,30))
pygame.display.update()
\ No newline at end of file
screen.blit(head,(x,y))
screen.blit(food,(360,120))
screen.blit(body,(x-30,90))
screen.blit(body,(x-60,90))
screen.blit(body,(x-90,90))
pygame.display.update()
FPSCLOCK.tick(3)
\ No newline at end of file
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