Commit 521ade2b by BellCodeEditor

auto save

parent 6e6b67e0
Showing with 8 additions and 5 deletions
......@@ -23,7 +23,7 @@ x, y = 240, 120
position = [(180, 90), (180, 120), (210, 120), (x, y)]
h_x=360
h_y=300
s = 0
setheading = "right"
snake_head = right
......@@ -62,6 +62,7 @@ while True:
m2=random.randint(1,16)
h_x=30*m1-30
h_y=30*m2-30
s+=10
else:
position.pop(0)
......@@ -77,9 +78,11 @@ while True:
# 将果实画上去
screen.blit(food, (h_x, h_y))
info="Screen"+str(screen)
info="Score"+str(s)
text=my_foot.render(info,True,(0,0,0))
screen.blit(text)
screen.blit(text,(500,10))
# 刷新画面
pygame.display.update()
FPSCLOCK.tick(3)
\ 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