Pathfinding using Breath First Search