Commit ccca2bcf by BellCodeEditor

save project

parent eda2160e
Showing with 6 additions and 3 deletions
...@@ -48,9 +48,12 @@ while True: ...@@ -48,9 +48,12 @@ while True:
head="up" head="up"
p.append((x,y)) p.append((x,y))
if apple_x==x and apple_y==y: if apple_x==x and apple_y==y:
apple_x=random.randint(0,660) s=random.randint(1,22)
apple_y=random.randint(0,480) b=random.randint(1,16)
p.pop(0) apple_x=s*30-30
apple_y=b*30-30
else:
p.pop(0)
t.tick(3) t.tick(3)
# 将背景图画上去 # 将背景图画上去
......
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