Commit a5f1dceb by BellCodeEditor

save project

parent 1a8a332c
Showing with 5 additions and 4 deletions
......@@ -57,8 +57,9 @@ while True:
if x==w and y==c:
n1=random.randint(1,22)
n2=random.randint(1,16)
w=n2*30-30
c=n1*30-30
w=n1*30-30
c=n2*30-30
else:
position.pop(0)
# 将背景图画上去
screen.blit(background, (0, 0))
......@@ -72,4 +73,4 @@ while True:
screen.blit(food, (w,c))
# 刷新画面
pygame.display.update()
FPSCLOCK.tick(8)
\ No newline at end of file
FPSCLOCK.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