Commit d6c58783 by BellCodeEditor

save project

parent a0f0e004
Showing with 4 additions and 4 deletions
......@@ -5,7 +5,7 @@ from pygame import locals
pygame.init()
# 创建一个窗口
screen = pygame.display.set_mode((660, 480))
screen = pygame.display.set_mode((6000, 3000))
z=pygame.time.Clock()
# 背景
background = pygame.image.load('bg.png')
......@@ -50,7 +50,7 @@ while True:
v.append((x,y))
v.pop(0)
# 将背景图画上去
screen.blit(background, (0, 0))
screen.blit(background, (990,990))
# 将贪吃蛇画上去
screen.blit(snake_head, v[-1])
# 将贪吃蛇的身体画上去
......@@ -62,4 +62,4 @@ while True:
screen.blit(food, (360, 300))
# 刷新画面
pygame.display.update()
z.tick(10)
\ No newline at end of file
z.tick(20)
\ 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