Commit 5cb99693 by BellCodeEditor

save project

parent a8388e1d
Showing with 6 additions and 0 deletions
......@@ -13,6 +13,9 @@ background = pygame.image.load('bg.png')
right = pygame.image.load('right.png')
food = pygame.image.load('apple.png')
body = pygame.image.load('body.png')
left=pygame.load('left.png')
up=pygame.load('up.png')
down=pygame.load('down.png')
x,y=240,120
position=[(180,90),(180,120),(210,120),(x,y)]
setheading="right"
......@@ -29,6 +32,9 @@ while True:
setheading='up'
if event.key==locals.K_DOWN and setheading !="up":
setheading='down'
snake_head=down
x+=30
position.append((x,y))
position.pop(0)
......
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