Everything that can be done with recursion can also
be done iterative on a single array
But a maze algorithm shouldn't be used,
it would make the script too slow and unrealistic.
The easier way to hunt the player is to
follow the last known position of the player and
then check again if the player can be seen.