-added pathfinding (implementation of A* alogrithm