Commit f660453e by BellCodeEditor

save project

parent ba62fa47
Showing with 2 additions and 2 deletions
...@@ -20,7 +20,7 @@ down = pygame.image.load('down.png') # 头 朝下 ...@@ -20,7 +20,7 @@ down = pygame.image.load('down.png') # 头 朝下
x, y = 240, 120 x, y = 240, 120
position = [(180, 90), (180, 120), (210, 120), (x, y)] position = [(180, 90), (180, 120), (210, 120), (x, y)]
setheading = 'd' setheading = "d"
snake_head = d snake_head = d
while True: while True:
...@@ -46,7 +46,7 @@ while True: ...@@ -46,7 +46,7 @@ while True:
snake_head = w snake_head = w
# 设置贪吃蛇的头部坐标 # 设置贪吃蛇的头部坐标
if setheading == "d" if setheading == "d":
x += 30 x += 30
elif setheading == "a": elif setheading == "a":
x -= 30 x -= 30
......
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