Commit 9c0644e6 by BellCodeEditor

auto save

parent 7f614f0d
Showing with 5 additions and 7 deletions
import pygame import pygame
from pygame import locals from pygame import locals
#载入图片
background = pygame.image.load(bg.png)
right = pygame.image.load(right.png)
snake = pygame.image.load(snake.png)
food = pygame.image.load(apple.png )
#创建一个窗口 #创建一个窗口
screen = pygame.display.set_mode((660,480)) screen = pygame.display.set_mode((660,480))
#载入图片
background = pygame.image.load("bg.png")
right = pygame.image.load("right.png")
food = pygame.image.load("apple.png")
pygame.init() pygame.init()
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
print(event)
if event.type == locals.QUIT: if event.type == locals.QUIT:
#接收到数据后退出程序 #接收到数据后退出程序
exit() exit()
......
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