Commit 4af52be2 by BellCodeEditor

save project

parent d8832cc9
Showing with 3 additions and 2 deletions
...@@ -27,6 +27,7 @@ ys_y=300 ...@@ -27,6 +27,7 @@ ys_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:
...@@ -76,8 +77,8 @@ while True: ...@@ -76,8 +77,8 @@ while True:
# 将果实画上去 # 将果实画上去
screen.blit(food, (ys_x, ys_y)) screen.blit(food, (ys_x, ys_y))
info='Score:'+str(score) info='Score:'+str(score)
text=my_font.render(inf,Ttue,(0,0,0)) text=my_font.render(info,True,(0,0,0))
screen.blit(text,510,0) screen.blit(text,(510,0))
# 刷新画面 # 刷新画面
pygame.display.update() pygame.display.update()
......
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