Commit 18d48220 by BellCodeEditor

save project

parent a0860e75
Showing with 3 additions and 0 deletions
...@@ -56,6 +56,9 @@ while True: ...@@ -56,6 +56,9 @@ while True:
else: else:
y += 30 y += 30
position.append((x, y)) position.append((x, y))
if x<0 or x>630 or y < 0 or y > 450:
exit()
if x == apple_X and y == apple_Y: if x == apple_X and y == apple_Y:
apple_X = random.randint(1,22)* 30 - 30 apple_X = random.randint(1,22)* 30 - 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