Commit dec31673 by BellCodeEditor

save project

parent cfd2ad2f
Showing with 3 additions and 1 deletions
...@@ -13,12 +13,14 @@ snake=pygame.image.load('right.png') ...@@ -13,12 +13,14 @@ snake=pygame.image.load('right.png')
body=pygame.image.load('body.png') body=pygame.image.load('body.png')
x=360 x=360
y=300 y=300
pos=[(360,300),(330,300),(300,300),(300,270)] pos=[(300,270),(330,300),(360,300),(x,y)]
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
if event.type==locals.QUIT: if event.type==locals.QUIT:
exit() exit()
x+=30 x+=30
pos.append(x,y)
pos.pop(0)
screen.blit(bg,(0,0)) screen.blit(bg,(0,0))
screen.blit(apple,(120,150)) screen.blit(apple,(120,150))
screen.blit(snake,(x,y)) screen.blit(snake,(x,y))
......
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