Commit 2599e6b8 by BellCodeEditor

save project

parent b6814000
Showing with 2 additions and 1 deletions
......@@ -49,8 +49,9 @@ while True:
if (x,y)==(apple_x,apple_y):
apple_x = 30*random.randint(0,20)
apple_y = 30*random.randint(0,16)
pos.append((x,y))
else:
pos.pop(0)
pos.append((x,y))
screen.blit(background,(0,0))
screen.blit(snake_head,pos[-1])
screen.blit(food,(apple_x,apple_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