A* search algorithm implementation in C#