Commit c9c1a83d by BellCodeEditor

save project

parent 7315e8f7
Showing with 7 additions and 0 deletions
......@@ -32,6 +32,13 @@ while True:
apple_y = random.randrange(0,480,30)
else:
longs.pop(0)
if x <0 or x>660 or y<0 or y >480:
screen.blit(food, (apple_x,apple_y))
text = "game over"
Myscore = my_font.render(text,Ture,(0,0,0))
screen.blit(Myscore,(330,140))
exit()
# 将背景图画上去
screen.blit(background,(0, 0))
# 将贪吃蛇画上去
......
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