Commit 04073da9 by BellCodeEditor

save project

parent 9db5941b
Showing with 15 additions and 0 deletions
......@@ -13,11 +13,26 @@ background = pygame.image.load('bg.png')
right = pygame.image.load('right.png')
food = pygame.image.load('apple.png')
body = pygame.image.load('body.png')
left=pygame.image.load('left.png')
down=pygame.image.load('down.png')
up=pygame.image.load('up.png')
x,y=240,120
position=[(180,90),(180,120),(210,120),(x,y)]
setheading=right
if event.key==locus.K_UPand setheading != "down"
setheading='up'
snake_head
K_DOWN
K_RIGHT
K_LEFT
while True:
for event in pygame.event.get():
print()
if event.type == locals.QUIT:
# 接收到退出事件后退出程序
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