Commit d045ef53 by BellCodeEditor

save project

parent 58cea1e9
Showing with 5 additions and 2 deletions
......@@ -64,12 +64,14 @@ while True:
a_x = randint(0,21)*30
a_y = randint(0,15)*30
position.insert(0,last)
screen.blit(body,last)
score += 1
screen.blit(body,last)
screen.blit(food,(a_x,a_y))
for i in range(len(position)-1):
if (x,y) == position[i]:
exit()
if x < 0 or x > 630 and y < 0 or y > 450:
exit()
pygame.display.update()
FPS.tick(3)
\ 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