Beispiel #1
0
        /// <summary>
        /// Initializes two dimensional array of PrimCell objects,
        /// by given dimensions.
        /// </summary>
        /// <param name="rows">Maze width, as number of rows.</param>
        /// <param name="columns">Maze height as number of columns.</param>
        /// <returns>Maze as two dimensional array of IMazeCell objects.</returns>
        private BacktrackerCell[,] InitializeBacktrackerMaze(int rows, int columns)
        {
            var maze = new BacktrackerCell[rows, columns];

            for (int row = 0; row < rows; row++)
            {
                for (int col = 0; col < columns; col++)
                {
                    maze[row, col] = new BacktrackerCell(row, col);
                }
            }

            return(maze);
        }
Beispiel #2
0
 public void CheckIfNegativeBacktrackercellCoordinatesThrowException()
 {
     BacktrackerCell backtrackerCell = new BacktrackerCell(-3, -3);
 }