add implementation of the algorithm A* for units