Commit 2dd9c85c by BellCodeEditor

save project

parent 96fa824e
Showing with 0 additions and 23 deletions
......@@ -20,29 +20,6 @@ while True:
if event.type == locals.QUIT:
# 接收到退出事件后退出程序
exit()
if event.type==locals.KEYDOWN:
if event.key==locals.K_RIGHT and setheading != "left":
setheading='right'
snack_head=left
if event.key==locals.K_LEFT and setheading != "right":
setheading='left'
snack_head=right
if event.key==locals.K_LEFT and setheading != "down":
setheading='up'
snack_head=down
if event.key==locals.K_LEFT and setheading != "up":
setheading='down'
snack_head=up
if setheading=="right":
x+=30
elif setheading=="left":
x-=30
elif setheading=="down":
y+=30
else:
y-=30
x+=30
ppp.append((x,y))
ppp.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