Commit 117acc9e by BellCodeEditor

auto save

parent d4afaaac
Showing with 110 additions and 4 deletions
...@@ -35,7 +35,114 @@ while True: ...@@ -35,7 +35,114 @@ while True:
if event.key == locals.K_LEFT and setheading != "right": if event.key == locals.K_LEFT and setheading != "right":
setheading = 'left' setheading = 'left'
snake_head = left snake_head = left
f event.key == locals.K_UP and setheading != "down": f event.key == locals
.K_UP and setheading != "down":
setheading = 'up' setheading = 'up'
snake_head = up snake_head = up
if event.key == locals.K_DOWN and setheading != "up": if event.key == locals.K_DOWN and setheading != "up":
...@@ -64,5 +171,4 @@ while True: ...@@ -64,5 +171,4 @@ while True:
# 将果实画上去 # 将果实画上去
screen.blit(food, (360, 300)) screen.blit(food, (360, 300))
# 刷新画面 # 刷新画面
pygame.display.update() pygame.disFPSCLOCK//
FPSCLOCK.tick( \ No newline at end of file
\ 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