Commit 19379b88 by BellCodeEditor

save project

parent 0e6c44d0
Showing with 5 additions and 5 deletions
......@@ -16,7 +16,8 @@ body = pygame.image.load('body.png') # 身体
left = pygame.image.load('left.png') # 头 朝左
up = pygame.image.load('up.png') # 头 朝上
down = pygame.image.load('down.png') # 头 朝下
my_font=pygame.font.Font('neuropd.ttf'18)
Score=0
x, y = 240, 120
position = [(180, 90), (180, 120), (210, 120), (x, y)]
......@@ -68,7 +69,9 @@ while True:
# 将贪吃蛇的身体画上去
for i in range(len(position)-1):
screen.blit(body, position[i])
info='Score'+Str(Score)
text=my_font.render(info,True,(0,0,0))
Screen.blit(text,(540,10))
# 将果实画上
screen.blit(food, (apple_x, apple_y))
# 刷新画面
......@@ -108,6 +111,3 @@ while True:
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