A* pathfinding implementation in C3