Commit ae6b42ad by BellCodeEditor

auto save

parent cbfc68ef
Showing with 4 additions and 6 deletions
...@@ -5,7 +5,7 @@ from pygame import locals ...@@ -5,7 +5,7 @@ from pygame import locals
pygame.init() pygame.init()
# 创建一个窗口 # 创建一个窗口
screen = pygame.display.set_mode((660, 480)) screen = pygame.display.set_mode((660,480))
FPSLOCK = pygame.time.Clock() FPSLOCK = pygame.time.Clock()
...@@ -33,17 +33,14 @@ while True: ...@@ -33,17 +33,14 @@ while True:
screen.blit(body,position[i]) screen.blit(body,position[i])
# 将贪吃蛇画上去 # 将贪吃蛇画上去
screen.blit(right, (x,y)) screen.blit(right, (x,y))
# 将贪吃蛇的身体画上去
#screen.blit(body, (210, 120))
#screen.blit(body, (180, 120))
#screen.blit(body, (180, 90))
# 将果实画上去 # 将果实画上去
screen.blit(food, (360, 300)) screen.blit(food, (360, 300))
# 刷新画面 # 刷新画面
screen.blit(food,(360,300))
pygame.display.update() pygame.display.update()
FPSLOCK.tick(3) FPSLOCK.tick(3)
\ 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