Commit af42fdd2 by BellCodeEditor

save project

parent 67093458
Showing with 8 additions and 0 deletions
...@@ -31,6 +31,14 @@ while True: ...@@ -31,6 +31,14 @@ while True:
if event.key == locals.K_DOWN and setheading != 'up': if event.key == locals.K_DOWN and setheading != 'up':
setheading = "down" setheading = "down"
set_head = down set_head = down
if setheading == "right":
x += 10
if setheading == "left":
x -= 10
if setheading == "up":
y += 10
if setheading == "down":
y -= 10
screen.blit(background, (0, 0)) screen.blit(background, (0, 0))
snakeList.pop(0) snakeList.pop(0)
snakeList.append((x,y)) snakeList.append((x,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