Commit 8fbf18bc by BellCodeEditor

auto save

parent 6283ae67
Showing with 7 additions and 5 deletions
......@@ -15,6 +15,8 @@ background = pygame.image.load('bg.png')
right = pygame.image.load('right.png')
food = pygame.image.load('apple.png')
body = pygame.image.load('body.png')
x, y = 240, 120
wz = [(x-90,y),(x-60,y),(x-30,y),(x,y)]
while True:
for event in pygame.event.get():
......@@ -26,12 +28,12 @@ while True:
# 将贪吃蛇画上去
screen.blit(right, (240 + weizhi, 120))
# 将贪吃蛇的身体画上去
screen.blit(body, (210, 120))
screen.blit(body, (180, 120))
screen.blit(body, (180, 90))
screen.blit(body, (210 + weizhi, 120))
screen.blit(body, (180 + weizhi, 120))
screen.blit(body, (150 + weizhi, 120))
# 将果实画上去
screen.blit(food, (360, 300))
# 刷新画面
weizhi = weizhi + 1
pygame.display.update()
FPS.tick(60)
\ No newline at end of file
FPS.tick(70)
\ 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