Commit 6160e6d8 by BellCodeEditor

save project

parent 3e87415d
Showing with 6 additions and 3 deletions
......@@ -52,10 +52,13 @@ while True:
else:
y += 30
position.append((x, y))
position.pop(0)
if x== ax and y ==ay:
ax=random.randint(0,660)
ay=random.randint(0,480)
a=random.randint(1,22)
b=random.randint(1,16)
ax=30*a-30
ay=30*b-30
else:
position.pop(0)
# 将背景图画上去
screen.blit(background, (0, 0))
# 将贪吃蛇的头画上去
......
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