Example #1
0
        public static void Main(string[] args)
        {
            int          n      = ReadInput();
            WalkInMatrix matrix = new WalkInMatrix(n);

            Console.Write(matrix.ToString());
        }
        public void ToStringTestSide6()
        {
            int n = 6;
            WalkInMatrix matrixActual = new WalkInMatrix(n);
            string expected = "   1  16  17  18  19  20\r\n" +
                               "  15   2  27  28  29  21\r\n" +
                               "  14  31   3  26  30  22\r\n" +
                               "  13  36  32   4  25  23\r\n" +
                               "  12  35  34  33   5  24\r\n" +
                               "  11  10   9   8   7   6\r\n";

            string actual = matrixActual.ToString();

            Assert.AreEqual(expected, actual);
        }
        public void ToStringTestSide1()
        {
            int n = 1;
            WalkInMatrix matrixActual = new WalkInMatrix(n);
            string expected = "   1\r\n";
            string actual = matrixActual.ToString();

            Assert.AreEqual(expected, actual);
        }
Example #4
0
 public static void Main(string[] args)
 {
     int n = ReadInput();
     WalkInMatrix matrix = new WalkInMatrix(n);
     Console.Write(matrix.ToString());
 }