Change declaration of is_visited_in_direction and is_wall_in_direction by adding them the position