Esempio n. 1
0
        public static void RunSampleTestcase()
        {
            ChessBoardWithMinimumSteps myChessBoard = new ChessBoardWithMinimumSteps(5);

            myChessBoard.CalculateChessBoardMinimumSteps();

            int[][] steps = myChessBoard.Step;

            for (int i = 0; i < steps.Length - 1; i++)
            {
                StringBuilder concatented = new StringBuilder();
                for (int j = 0; j < steps[0].Length - 1; j++)
                {
                    concatented.Append(steps[i][j] + " ");
                }

                Console.WriteLine(concatented.ToString());
            }
        }
Esempio n. 2
0
        public static void ProcessInput()
        {
            int size = Convert.ToInt32(Console.ReadLine());

            ChessBoardWithMinimumSteps myChessBoard = new ChessBoardWithMinimumSteps(size);

            myChessBoard.CalculateChessBoardMinimumSteps();

            int[][] steps = myChessBoard.Step;

            for (int i = 0; i < steps.Length - 1; i++)
            {
                StringBuilder concatented = new StringBuilder();
                for (int j = 0; j < steps[0].Length - 1; j++)
                {
                    concatented.Append(steps[i][j] + " ");
                }

                Console.WriteLine(concatented.ToString());
            }
        }