Commit d955644d by BellCodeEditor

auto save

parent f5ecde70
Showing with 0 additions and 7 deletions
...@@ -61,8 +61,6 @@ while True: ...@@ -61,8 +61,6 @@ while True:
apple_y = random.randint(0, 480) apple_y = random.randint(0, 480)
position.pop(0) position.pop(0)
if x<0 or x>630 or
# 将背景图画上去 # 将背景图画上去
screen.blit(background, (0, 0)) screen.blit(background, (0, 0))
# 将贪吃蛇的头画上去 # 将贪吃蛇的头画上去
...@@ -70,13 +68,9 @@ while True: ...@@ -70,13 +68,9 @@ while True:
# 将贪吃蛇的身体画上去 # 将贪吃蛇的身体画上去
for i in range(len(position)-1): for i in range(len(position)-1):
screen.blit(body, position[i]) screen.blit(body, position[i])
# 将果实画上去 # 将果实画上去
screen.blit(food, (360, 300)) screen.blit(food, (360, 300))
into = "score"+str(score)
text = my_font.random(into,True,(0,0,0))
screen.blit(text,(540,10))
# 刷新画面 # 刷新画面
pygame.display.update() pygame.display.update()
FPSCLOCK.tick(3) 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