Added Dijkstra's algorithm for pathfinding