Commit 20501d8c by BellCodeEditor

save project

parent d29d837d
Showing with 4 additions and 4 deletions
......@@ -26,16 +26,16 @@ while True:
exit()
else:
if event.type==locals.KEYDOWN:
if event.key==locals.K_RIGHT and heading!="left"
if event.key==locals.K_RIGHT and heading!="left":
heading="right"
snakehead=right
if event.key==locals.K_LEFT and heading!="right"
if event.key==locals.K_LEFT and heading!="right":
heading="left"
snakehead=left
if event.key==locals.K_UP and heading!="down"
if event.key==locals.K_UP and heading!="down":
heading="up"
snakehead=up
if event.key==locals.K_DOWN and heading!="up"
if event.key==locals.K_DOWN and heading!="up":
heading="down"
snakehead=down
xy.append((x,y))
......
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