Commit b8ba89e8 by BellCodeEditor

save project

parent 4a6ed99e
Showing with 2 additions and 2 deletions
...@@ -24,7 +24,7 @@ apple_x=360 ...@@ -24,7 +24,7 @@ apple_x=360
apple_y=300 apple_y=300
setheading = "right" setheading = "right"
snake_head = right snake_head = right
Score=0 score=0
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
if event.type == locals.QUIT: if event.type == locals.QUIT:
...@@ -72,7 +72,7 @@ while True: ...@@ -72,7 +72,7 @@ while True:
# 将果实画上去 # 将果实画上去
screen.blit(food, (360, 300)) screen.blit(food, (360, 300))
info="Score:"+str(Score) info="Score:"+str(score)
text=my_font.render(info,True,(0,0,0)) text=my_font.render(info,True,(0,0,0))
screen.blit(text,(540,10)) screen.blit(text,(540,10))
# 刷新画面 # 刷新画面
......
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