Commit 96d61ddb by BellCodeEditor

save project

parent 25fe8583
Showing with 1 additions and 1 deletions
...@@ -26,7 +26,7 @@ while True: ...@@ -26,7 +26,7 @@ while True:
# 接收到退出事件后退出程序 # 接收到退出事件后退出程序
exit() exit()
elif event.type==locals.KEYDOWN: elif event.type==locals.KEYDOWN:
if event.key == locals.K_right: if event.key == locals.K_right and setheading != "left":
setheading="right" setheading="right"
snake_head=right snake_head=right
if event.key == locals.K_left: if event.key == locals.K_left:
......
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