/// <summary>
        /// reconstruction all the moves from the end position to the start and reverce it
        /// </summary>
        /// <param name="state"> the end position</param>
        /// <returns> the solution to the problem </returns>
        protected Solution makeSolotion(AState state)
        {
            Solution result = new Solution();

            while (state != null)
            {
                result.AddState(state);
                state = state.GetParent();
            }

            result.RevereseSolution();

            return(result);
        }