Commit 8b141dbe by BellCodeEditor

auto save

parent a85cd539
Showing with 6 additions and 2 deletions
...@@ -64,8 +64,12 @@ while True: ...@@ -64,8 +64,12 @@ while True:
for i in range(len(position)-1): for i in range(len(position)-1):
screen.blit(body, position[i]) screen.blit(body, position[i])
if apple_x and apple_y==x and y: if apple_x and apple_y==x and y:
apple_x=random.randint(0,660) apple_x=random.randint(0,21)
apple_y=random.randint(0,480) apple_y=random.randint(0,15)
apple_x=30*num1
apple_y=30*num2
else
position.pop(0)
# 将果实画上去 # 将果实画上去
screen.blit(food, (apple_x,apple_y)) screen.blit(food, (apple_x,apple_y))
# 刷新画面 # 刷新画面
......
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