Commit f62a29e0 by BellCodeEditor

save project

parent 19b3da0c
Showing with 8 additions and 3 deletions
...@@ -52,10 +52,15 @@ while True: ...@@ -52,10 +52,15 @@ while True:
else: else:
y += 30 y += 30
position.append((x, y)) position.append((x, y))
position.pop(0)
if x==food_x and y==food_y: if x==food_x and y==food_y:
food_x=random.randint(0,660) o=random.randint(1,22)
food_y=random.randint(0,480) o1=random.randint(1,16)
food_x=o*30-30
food_y=o1*30-30
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