Commit 1aab4911 by BellCodeEditor

save project

parent 9918eea7
Showing with 16 additions and 0 deletions
......@@ -19,6 +19,22 @@ while True:
if event.type == locals.QUIT:
# 接收到退出事件后退出程序
exit()
elif event.typy==locals.KEYDOWN:
if event.type==locals.K_RIGHT and setheading !="left":
setheading="right"
snake_head=right
if event.type==locals.K_RIGHT and setheading !="left":
setheading="right"
snake_head=right
x+=30
position.append((x,y))
position.pop(0)
......
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