Commit 8a05f4e3 by BellCodeEditor

save project

parent c584c0a6
Showing with 8 additions and 3 deletions
...@@ -39,12 +39,17 @@ while True: ...@@ -39,12 +39,17 @@ while True:
snake_head=down snake_head=down
if setheading=='right': if setheading=='right':
x+=30 x+=30
if setheading=='left': elif setheading=='left':
x-=30 x-=30
if setheading=='up': elif setheading=='up':
y-=30 y-=30
if setheading=='down': else:
y+=30 y+=30
position.apple((x,y))
position.pop(0)
screen.blit(snake_head,position[-1])
screen.blit(background,(0,0))
screen.blit(apple,(420,150))
#x+=30 #x+=30
# 将背景图画上去 # 将背景图画上去
screen.blit(background, (0, 0)) screen.blit(background, (0, 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