Commit c15bb7a2 by BellCodeEditor

auto save

parent 7a644138
Showing with 3 additions and 1 deletions
1.jpg

34.8 KB

2.jpeg

208 KB

......@@ -10,6 +10,8 @@ FPSCLOCK = pygame.time.Clock() # pygame时钟,控制游戏速度(帧数)
# 背景
background = pygame.image.load('bg.png')
background1 = pygame.image.load('1.jpg')
background2 = pygame.image.load('2.jpeg')
right = pygame.image.load('right.png') # 头 朝右
food = pygame.image.load('apple.png') # 食物 苹果
body = pygame.image.load('body.png') # 身体
......@@ -65,7 +67,7 @@ while True:
position.append((x, y))
# 将背景图画上去
screen.blit(background, (0, 0))
screen.blit(background2, (0, 0))
# 将贪吃蛇的头画上去
screen.blit(snake_head, position[-1])
# 将贪吃蛇的身体画上去
......
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