Fixed a bug in the move_towards function

Monsters waited the player near the doors due to the previous direction calculation method.