Commit 22820bfa by BellCodeEditor

auto save

parent bc58926b
Showing with 3 additions and 2 deletions
......@@ -14,7 +14,8 @@ food = pygame.image.load('apple.png')
body = pygame.image.load('body.png')
up = pygame.image.load('up.png')
down = pygame.image.load('down.png')
setheading='right'
snake_head=right
x,y = 240,120
position = [(180,90),(180,120),(210, 120),(x,y)]
while True:
......@@ -23,7 +24,7 @@ while True:
# 接收到退出事件后退出程序
exit()
if event.type ==locals.KEYDOWN
if event.type ==locals.KEYDOWN:
if event.key == locals.K_RIGHT and setheading !="left":
setheading = 'right'
snake_head = right
......
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