Commit 0fb0dad9 by BellCodeEditor

save project

parent 9fbdd0d2
Showing with 9 additions and 1 deletions
......@@ -43,6 +43,14 @@ while True:
x+=30
else:
y-=30
food_x=360
food_y=180
if x==food_x and y==food_y:
food_x=random(0,660)
food_y=random(0,480)
flb.append((x,y))
flb.pop(0)
......@@ -51,7 +59,7 @@ while True:
for i in range(len(flb)-1):
screen.blit(body,flb[i])
screen.blit(food, (360, 300))
screen.blit(food, (food_x,food_y))
pygame.display.update()
lock.tick(3)
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