The prophet is lost in his way to the target.
tick(), the prophet can decide to move
'right' and he can always get the direct
distance() to the target.
Help him find his way quicker, by hacking
You can and probably should define additional functions and global variables.