Commit d09921a7 by BellCodeEditor

save project

parent 5919ff9d
Showing with 8 additions and 1 deletions
...@@ -6,6 +6,9 @@ pygame.init() ...@@ -6,6 +6,9 @@ pygame.init()
background=pygame.image.load('bg.png') background=pygame.image.load('bg.png')
right=pygame.image.load("right.png") right=pygame.image.load("right.png")
food=pygame.image.load("apple.png") food=pygame.image.load("apple.png")
body1=pygame.image.load("body.png")
body2=pygame.image.load("body.png")
body3=pygame.image.load("body.png")
# 创建一个窗口 # 创建一个窗口
screen=pygame.display.set_mode((660,480)) screen=pygame.display.set_mode((660,480))
while True: while True:
...@@ -15,7 +18,11 @@ while True: ...@@ -15,7 +18,11 @@ while True:
#将背景图画上去 #将背景图画上去
screen.blit(background,(0,0)) screen.blit(background,(0,0))
#将蛇头画上去 #将蛇头画上去
screen.blit(right,(290,120)) screen.blit(right,(240,120))
#将苹果画上去 #将苹果画上去
screen.blit(food,(360,300)) screen.blit(food,(360,300))
#将蛇身画上去
screen.blit(body1,(210,120))
screen.blit(body2,(180,120))
screen.blit(body3,(120,120))
pygame.display.update() pygame.display.update()
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