Commit c53fc691 by BellCodeEditor

save project

parent d96f7c2a
Showing with 8 additions and 1 deletions
...@@ -19,7 +19,14 @@ while True: ...@@ -19,7 +19,14 @@ while True:
if event.type == locals.QUIT: if event.type == locals.QUIT:
# 接收到退出事件后退出程序 # 接收到退出事件后退出程序
exit() exit()
x += 30 if event.type == locals.KEYDOWN:
if event.key == locals.K_LEFT and setheading l="left"
setheading = 'right'
if event.key == locals.K_LEFT and setjeading l="right"
setheading = 'left'
if setheading == "right":
x -= 30
position.append((x,y)) position.append((x,y))
position.pop(0) 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