Commit 13c00760 by BellCodeEditor

save project

parent 4b165696
Showing with 4 additions and 0 deletions
...@@ -52,6 +52,10 @@ while True: ...@@ -52,6 +52,10 @@ while True:
y -= 30 y -= 30
else: else:
y += 30 y += 30
if x<0 or y<0 or y>450 or x>630:
exit()
if (x,y)in position:
exit()
position.append((x, y)) position.append((x, y))
if x==apple_x and y==apple_y: if x==apple_x and y==apple_y:
apple_x=random.randint(0,21)*30 apple_x=random.randint(0,21)*30
......
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