Esempio n. 1
0
        /// <summary>
        /// Print the solution to the console. This is a method that is used for debug.
        /// </summary>
        /// <param name="end"></param>
        private void printSolution(WorldState end)
        {
            int step = 0;

            Console.WriteLine("solution back to front");
            Console.WriteLine("------------------------------\n");
            while (end != null)
            {
                Console.WriteLine("step " + step);
                Console.WriteLine(end.ToString());
                step++;
                end = end.prevStep;
            }
        }