Advertisement
Guest User

Untitled

a guest
Apr 7th, 2020
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. def run(path):
  2.     path = path.split("")
  3.    
  4.     for d in path:
  5.         if d == "d":
  6.             hero.moveRight()
  7.         elif d == "a":
  8.             hero.moveLeft()
  9.         elif d == "w":
  10.             hero.moveUp()
  11.         elif d == "s":
  12.             hero.moveDown()
  13.  
  14. run("")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement