Commit 41ebcc91 by BellCodeEditor

save project

parent 61c798e7
Showing with 7 additions and 3 deletions
...@@ -22,5 +22,9 @@ from pygame import locals ...@@ -22,5 +22,9 @@ from pygame import locals
screen.blit(food,(360,300)) screen.blit(food,(360,300))
pygame.dispiay.update() pygame.dispiay.update()
if x == apple_x and y == apple_y: if x == apple_x and y == apple_y:
apple_x = random.randint(0,660) apple_x = random.randint(1,22)
apple_y = random.randint(0,480) apple_y = random.randint(1,16)
\ No newline at end of file apple_x = num1 * 30 - 30
apple_y = num2 * 30 - 30
else:
position.pop(0)
\ 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