Commit 98dd2d4a by BellCodeEditor

save project

parent b7d5f913
Showing with 1 additions and 1 deletions
......@@ -54,7 +54,6 @@ while True:
else:
y += 30
position.append((x, y))
screen.blit(food, (ax,ay))
if ax==x and ay==y:
ax=30*random.randint(0,21)
ay=30*random.randint(0,15)
......@@ -64,6 +63,7 @@ while True:
screen.blit(background, (0, 0))
# 将贪吃蛇的头画上去
screen.blit(snake_head, position[-1])
screen.blit(food, (ax,ay))
# 将贪吃蛇的身体画上去
for i in range(len(position)-1):
screen.blit(body, position[i])
......
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