Commit 5a630e17 by BellCodeEditor

save project

parent 97086b37
Showing with 4 additions and 0 deletions
......@@ -56,6 +56,9 @@ while True:
y -= 30
else:
y += 30
if x<0 or x>630 or y<0 or y>450:
exit()
position.append((x, y))
# 将背景图画上去
......@@ -65,6 +68,7 @@ while True:
if pg_x == x and pg_y == y :
pg_x = random.randint(0,21)*30
pg_y = random.randint(0,15)*30
fenshu = fenshu + 10
else:
position.pop(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