Commit 3dd56439 by BellCodeEditor

save project

parent 4532951f
Showing with 8 additions and 0 deletions
......@@ -6,6 +6,10 @@ from pygame import locals
right = pygame.image.load('right.png')
food = pygame.image.load('apple.png')
body = pygame.image.load('body.png')
apple_x = 360
apple_y = 300
while True:
for event in pygame.event.get():
if eyent.type == locals.QUIT:
......@@ -17,3 +21,6 @@ from pygame import locals
screen.blit(body,(180,90))
screen.blit(food,(360,300))
pygame.dispiay.update()
if x == apple_x and y == apple_y:
apple_x = random.randint(0,660)
apple_y = random.randint(0,480)
\ 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