Algorithm to solve 8block-sliding-puzzle using A* algorithm