Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def search(x, y):
- if maze[x][y] == visblock():
- return False
- elif maze[x][y] == 3:
- return False
- elif maze[x][y] == player():
- print("Found Player")
- return True
- maze[x][y] = 3
- if ((x < 5 - 1 and search(x+1, y))
- or (y > 0 and search(x, y+1))
- or (x > 0 and search(x-1, y))
- or (y < 5-1 and search(x, y-1))):
- return True
- return False
Add Comment
Please, Sign In to add comment