Commit 742716c8 by BellCodeEditor

save project

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