Commit 513e4bf0 by BellCodeEditor

save project

parent 1ef665db
Showing with 9 additions and 1 deletions
...@@ -10,11 +10,18 @@ food = pygame.image.load('food.png') ...@@ -10,11 +10,18 @@ food = pygame.image.load('food.png')
body = pygame.image.load('boay.png') body = pygame.image.load('boay.png')
x,y = 240,120 x,y = 240,120
position = [(180,90),(180,120),(),(x,y)]
pygame.display.set_mode((660,480)) pygame.display.set_mode((660,480))
while True: while True:
for event in pygame.event.get() for event in pygame.event.get()
print(event) print(event)
if event.type == locals.QUIT: if event.type == locals.QUIT:
exit() exit()
x-=30 x-=30
position.append(x,y)
position.pop(0)
screen.blit(backgound,(0,0))
screen.blit(right,(x,y))
for i in range(len(position)):
screen.blit(body,position[i])
\ 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