Commit a3b11e68 by BellCodeEditor

auto save

parent 71fdb810
Showing with 14 additions and 9 deletions
...@@ -2,18 +2,22 @@ import pygame ...@@ -2,18 +2,22 @@ import pygame
from pygame import locals from pygame import locals
# 初始化pygame,为使用pygame做准备 # 初始化pygame,为使用pygame做准备
pygame.init() pygame.init()
bg=pygane.image.loag("bg.png") bg=pygame.image.load("bg.png")
body=pygane.image.loag("body.png") body=pygame.image.load("body.png")
apple=pygane.image.loag("appel.png") apple=pygame.image.load("apple.png")
down=pygane.image.loag("down.png") down=pygame.image.load("down.png")
lelf=pygane.image.loag("lelf.png") left=pygame.image.load("left.png")
neuropol=pygane.image.loag("neueopol.png") right=pygame.image.load("right.png")
right=gane.image.loag("right.png") up=pygame.image.load("up.png")
snake=gane.image.loag("snake.png")
up=gane.image.loag("up.png")
# 创建一个窗口 # 创建一个窗口
screen =pygame.display.set_mode((800,600)) screen =pygame.display.set_mode((800,600))
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
if event.type==locals.QUIT: if event.type==locals.QUIT:
exit() exit()
screen.blit(bg,(0,0))
screen.blit(right,(150,60))
screen.blit(body,(120,60))
screen.blit(apple,(30,60))
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