Commit db03035d by BellCodeEditor

save project

parent ea448c12
Showing with 3 additions and 2 deletions
...@@ -24,7 +24,7 @@ while True: ...@@ -24,7 +24,7 @@ while True:
if event.type == locals.QUIT: if event.type == locals.QUIT:
# 接收到退出事件后退出程序 # 接收到退出事件后退出程序
exit() exit()
if event.type==locals.KEYDOWN: elif event.type==locals.KEYDOWN:
if event.key==locals.K_UP and qqq !="down": if event.key==locals.K_UP and qqq !="down":
qqq="up" qqq="up"
snake_head=up snake_head=up
...@@ -37,7 +37,8 @@ while True: ...@@ -37,7 +37,8 @@ while True:
if event.key==locals.K_LEFT and qqq !="right": if event.key==locals.K_LEFT and qqq !="right":
qqq="left" qqq="left"
snake_head=left snake_head=left
print(event.key)
x+=30
sss.append((x,y)) sss.append((x,y))
sss.pop(0) sss.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