Commit a8228788 by BellCodeEditor

save project

parent 056c6a57
Showing with 9 additions and 4 deletions
......@@ -7,8 +7,9 @@ pygame.init()
FPSCLOCK = pygame.time.Clock()
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')
......@@ -16,14 +17,18 @@ body = pygame.image.load('body.png')
left = pygame.image.load('up.png')
up = pygame.image.load('up.png')
down = pygame.image.load('down.png')
my_font = pygame.font.Font('neuropol.ttf', 18)
x, y = 240, 120
position = [(180,90), (180,120), (210,120), (x,y)]down = pygame.image.load('down.png')
apple_x = 360
apple_y = 360
setheading = "right"
snake_head = right
score = 0
ehilt True:
for event in pygame.event.get():
if event.type == locals.QUIT:
# 接收到退出事件后退出程序
......
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