Commit 8be1f7df by BellCodeEditor

save project

parent 40832beb
Showing with 2 additions and 0 deletions
...@@ -45,6 +45,8 @@ while True: ...@@ -45,6 +45,8 @@ 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_head = down snake_head = down
if x>660 or x<0 or y>480 or y<0:
exit()
# 设置贪吃蛇的头部坐标 # 设置贪吃蛇的头部坐标
if setheading == "right": if setheading == "right":
......
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