Commit ef94f2c0 by BellCodeEditor

save project

parent 14b6d92b
Showing with 3 additions and 0 deletions
...@@ -42,6 +42,7 @@ while True: ...@@ -42,6 +42,7 @@ while True:
snake_head = down snake_head = down
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))
if setheading == "right": if setheading == "right":
x += 30 x += 30
elif setheading == "left": elif setheading == "left":
...@@ -68,5 +69,6 @@ while True: ...@@ -68,5 +69,6 @@ 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, (apple_x, apple_y)) screen.blit(food, (apple_x, apple_y))
screen.blit(text, (540,10))
pygame.display.update() pygame.display.update()
FPSCLOCK.tick(6) FPSCLOCK.tick(6)
\ 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