Commit 742716c8 by BellCodeEditor

save project

parent 0f3b744a
Showing with 6 additions and 6 deletions
......@@ -55,10 +55,10 @@ while True:
y += 30
position.append((x, y))
if x==apple_x and y==apple_y:
mun1=random.randint(1,22)
mun2=random.randint(1,16)
apple_x=mun1
apple_y=mun2
mun1=random.randint(1,20)
mun2=random.randint(1,14)
apple_x=mun1*30-30
apple_y=mun2*30-30
score+=10
else:
position.pop(0)
......@@ -79,4 +79,4 @@ while True:
screen.blit(food, (apple_x, apple_y))
# 刷新画面
pygame.display.update()
FPSCLOCK.tick(3)
\ No newline at end of file
FPSCLOCK.tick(4)
\ 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