Commit a43d158e by BellCodeEditor

auto save

parent 9fe805ad
Showing with 2 additions and 4 deletions
......@@ -40,7 +40,6 @@ while True:
if event.key == locals.K_DOWN and setheading != "up":
setheading = 'down'
snake_head = down
# 设置贪吃蛇的头部坐标
if setheading == "right":
x += 30
......@@ -55,7 +54,6 @@ while True:
if x==apple_x and y==apple_y:
apple_x = random.randint(0,21)*30
apple_y = random.randint(0,15)*30
score =+ 10
else:
position.pop(0)
if x>630 or x<0 or y<0 or y>450 :
......@@ -73,4 +71,4 @@ while True:
text = my_font.render(into,True,(0,0,0))
screen.blit(text,(540,10))
pygame.display.update()
FPSCLOCK.tick(8)
\ No newline at end of file
FPSCLOCK.tick(15)
\ 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