Commit 051cf99b by BellCodeEditor

save project

parent 31e4e36b
Showing with 8 additions and 3 deletions
......@@ -5,19 +5,24 @@ pygame.init()
# 创建一个窗口
screen = pygame.display.set_mode((660,480))
fps=pygame.time.Clock()
#载入图片
bg=pygame.image.load('bg.png')
apple=pygame.image.load('apple.png')
snake=pygame.image.load('right.png')
body=pygame.image.load('body.png')
x=360
y=300
while True:
for event in pygame.event.get():
if event.type==locals.QUIT:
exit()
x+=30
screen.blit(bg,(0,0))
screen.blit(apple,(120,150))
screen.blit(snake,(360,300))
screen.blit(snake,(x,y))
screen.blit(body,(330,300))
screen.blit(body,(300,300))
screen.blit(body,(300,270))
pygame.display.update()
\ No newline at end of file
pygame.display.update()
fps.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