Commit 91060f92 by BellCodeEditor

save project

parent 16af5301
Showing with 4 additions and 4 deletions
......@@ -25,16 +25,16 @@ while True:
if event.key ==locals.K_LEFT and setheading !="right":
setheading = 'left'
snake_head = 'left'
if event.key == locals.K_UP and,setheading != "down"
if event.key == locals.K_UP and setheading != "down":
setheading ='up'
snake_head = up
if event.key == locals.K_DOWN and setheading !="up"
if event.key == locals.K_DOWN and setheading !="up":
setheading = 'down'
snake_head =down
if setheading == "right":
x += 30
elif setheading == "left":
x-=
x-= 30
elif setheading == "up":
y-= 30
else:
......@@ -45,7 +45,7 @@ while True:
screen.blit(background, (0, 0))
screen.blit(right, position[-1])
screen.blit(right, (x, y))
for i in range(len(position)-1)
for i in range(len(position)-1):
screen.blit(body,position[i])
screen.blit(food, (360, 300))
pygame.display.update()
......
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