public static void Main() { MatrixCreator matrixCerator = new MatrixCreator(); int matrixSize = matrixCerator.GetMatrixSize(); int[,] matrix = new int[matrixSize, matrixSize]; MatrixWalker matrixWalker = new MatrixWalker(); int positionIndex = 1; int positionX = 0; int positionY = 0; int stepInDirectionX = 1; int stepInDirectionY = 1; matrixWalker.ConstructMatrix(matrix, ref positionIndex, ref positionX, ref positionY, ref stepInDirectionX, ref stepInDirectionY); matrixCerator.PrintMatrix(matrix); }
public void TestValidInitialPositionInY() { MatrixWalker matrixWalker = new MatrixWalker(); int[,] matrix = { {0,0,0}, {0,0,0}, {0,0,0} }; int positionIndex = 1; int positionX = 0; int positionY = 1; int stepInDirectionX = 1; int stepInDirectionY = 1; matrixWalker.ConstructMatrix(matrix, ref positionIndex, ref positionX, ref positionY, ref stepInDirectionX, ref stepInDirectionY); }