Commit 29324c87 by BellCodeEditor

auto save

parent 39318ca3
Showing with 17 additions and 1 deletions
......@@ -3,9 +3,24 @@ from pygame import locals
# 初始化pygame,为使用pygame做准备
pygame.init()
# 创建一个窗口
pygame.diseplay.set_mode((660,480))
screen = pygame.display.set_mode((660,480))
#载入图片
apple= pygame.image.load("apple.png")
#载入背景
bg=pygame.image.load("bg.png")
#载入蛇
right=pygame.image.load("right.png")
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
exit()
screen.blit(bg,(0,0))
screen.blit(apple,(120,102))
screen.blit(right,(120,120))
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