Guest User

Untitled

a guest
Jan 17th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. def search(x, y):
  2. if maze[x][y] == visblock():
  3. return False
  4. elif maze[x][y] == 3:
  5. return False
  6. elif maze[x][y] == player():
  7. print("Found Player")
  8. return True
  9.  
  10. maze[x][y] = 3
  11.  
  12. if ((x < 5 - 1 and search(x+1, y))
  13. or (y > 0 and search(x, y+1))
  14. or (x > 0 and search(x-1, y))
  15. or (y < 5-1 and search(x, y-1))):
  16. return True
  17.  
  18. return False
Add Comment
Please, Sign In to add comment