Commit f5f8d49d by BellCodeEditor

save project

parent 6d23d76b
Showing with 3 additions and 8 deletions
......@@ -4,8 +4,7 @@ from pygame import locals
pygame.init()
background=pygame.image.load('bg.png')
right=pygame.image.load("right.png")
food=pygame.image.load('apple.png')
snake=pygame.image.load('body.png')
# 创建一个窗口
screen=pygame.display.set_mode((800,600))
while True:
......@@ -13,11 +12,6 @@ while True:
if a.type==locals.QUIT:
exit()
screen.blit(background,(0,0))
screen.blit(right,(210,120))
screen.blit(snake,(180,120))
screen.blit(snake,(150,120))
screen.blit(snake,(120,120))
screen.blit(snake,(120,90))
screen.blit(background
screen.blit(food,(360,300))
pygame.display.update()
\ 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