Commit a3510bc6 by BellCodeEditor

save project

parent 16f0d60e
Showing with 8 additions and 12 deletions
...@@ -19,14 +19,10 @@ while True: ...@@ -19,14 +19,10 @@ while True:
# 接收到退出事件后退出程序 # 接收到退出事件后退出程序
exit() exit()
# 将背景图画上去 # 将背景图画上去
screen.blit(background, (0, 0)) elif event.type==locals.OULT
# 将贪吃蛇画上去 if event.key==locals.K_RLYDOWN:
screen.blit(right, (240, 120)) setheading = 'right'
# 将贪吃蛇的身体画上去 snack_head = right
screen.blit(body, (210, 120)) if event.key==locals.K_LEFT and setheading != "left"
screen.blit(body, (180, 120)) setheading = 'right'
screen.blit(body, (180, 90)) s
# 将果实画上去 \ No newline at end of file
screen.blit(food, (360, 300))
# 刷新画面
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