Commit 3df9da51 by BellCodeEditor

save project

parent 5c2a395c
Showing with 2 additions and 2 deletions
......@@ -56,7 +56,8 @@ while True:
y += 30
position.append((x, y))
#不能出框
if y>630 or y<0 or x>450 or x<0
if y>630 or y<0 or x>450 or x<0:
position.pop(0)
# 将背景图画上去
screen.blit(background, (0, 0))
# 将贪吃蛇的头画上去
......@@ -64,7 +65,6 @@ while True:
# 将贪吃蛇的身体画上去
for i in range(len(position)-1):
screen.blit(body, position[i])
if x==food_x and y==food_y:
gj1=random.randint(1,22)
gj2=random.randint(1,16)
......
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