Commit 32f1aeed by BellCodeEditor

save project

parent 326fd79b
Showing with 8 additions and 1 deletions
...@@ -42,7 +42,14 @@ while True: ...@@ -42,7 +42,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"
snake_tou = down snake_tou = down
#x = x + 30 if snake_tou == right:
x += 30
elif snake_tou == left:
x -=30
elif snake_tou == up:
y -= 30
else:
y += 30
position.append((x,y)) position.append((x,y))
position.pop(0) position.pop(0)
FPSCLOCK.tick(3) FPSCLOCK.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