   Very late, but it's done.
  So I know this is really ...really late, but lately I've not had as much free time as I'd like, so this workshop may have to take a backseat to other things in my life right now. I'll make an effort to get caught up on project 2, but I'm not sure if I'm going to be able to. Anyway, I still made a point to finish what I'd started, so here is my code! A little ugly but it gets the job done.using System;namespace ConsoleApplication1{struct Wall{public int room1;public int room2;public Boolean isDown;}struct Room{public int roomNumber;public int verticalWall;public int horizonatalWall;}class Class1{static void Main(string[] args){int rows = 0;int cols = 0;int numRooms;int numWalls;bool validInput = false;bool appDone = false;string answer;while( appDone == false ){Console.WriteLine( "Begining Maze Generation Sequence.\n" );validInput = false;while( validInput == false ) {// Receive and validate user input.Console.Write( "Enter Number of Rows (2-50): " );rows = Int32.Parse( Console.ReadLine() );if( rows > 50 || rows < 2 ){Console.WriteLine( "Invalid input. Please enter a number between 2 and 50." );}else{validInput = true;}}validInput = false;while( validInput == false ) {Console.Write( "Enter Numer of Columns (2-50): " );cols = Int32.Parse( Console.ReadLine() );if( cols > 50 || cols < 2 ){Console.WriteLine( "Invalid input. Please enter a number between 2 and 50." );}else{validInput = true;}}// Set the variables to their initial state.numRooms = rows * cols;numWalls = rows * ( 2 * cols - 1 ) - cols;// Create an array of rooms. Room[,] rooms;rooms = new Room[rows, cols];// Create an array of Walls Wall[] walls;walls = new Wall[numWalls];// Loop through the rooms array and initialize the room sets.for( int i = 0; i < rows; i++ ){for( int j = 0; j < cols; j++ ){rooms[i, j].roomNumber  = ( i * cols ) + j;// If there is no horizontal wall, set it to -1.if( i < rows - 1 ){rooms[i,j].horizonatalWall = rooms[i, j].roomNumber + ( ( i + 1 ) * ( cols - 1 ) );}else{rooms[i,j].horizonatalWall = -1;}if( j < cols - 1 ) {rooms[i, j].verticalWall = rooms[i, j].roomNumber + ( i * ( cols - 1) );}else{rooms[i,j].verticalWall = -1;}}}int currentRow = 0;int modularIndex = 0;Random rand = new Random();// Assign two rooms to each wall.for( int i = 0; i < numWalls; i++ ){// Convert i to a number (currentRow) as if we were incrementing it with modular addition using (cols+rows) as the modulus.// Use this value to determine if we looking at a vertical wall or a horizontal wall.// The first (cols-1) walls are always vertical, and the rest of the walls are horizontal.// When the moldular index wraps back around to zero, increment the row. Don't do this on the first iteration though.if( i != 0 ){if( i % ( ( cols - 1 ) + cols ) == 0){currentRow++;modularIndex = 0;}}// If this is a vertical wall, add the rooms to the left and right of it. Otherwise, add the rooms above and below it.if( modularIndex < cols - 1 ){walls.room1 = i - ( currentRow * ( cols - 1 ) );walls.room2 = walls.room1 + 1;}else{walls.room1 =  i - ( ( currentRow + 1 ) * ( cols - 1 ) );walls.room2 = walls.room1 + cols;}modularIndex++;}// Generate a random room permutation. After setting the initial values, loop through again.// Choose a random number from 0 to numRooms-1, and swap the current room with it.int[] wallList;wallList = new int[numWalls];for( int i = 0; i < numWalls; i++ ){wallList = i;}for( int i = 0; i < numWalls; i++ ){int temp;int random;random = rand.Next( numRooms );temp = wallList[random];wallList[random] = wallList;wallList = temp;}// Start knocking down the walls to build the maze.for( int i = 0; i < numWalls; i++ ){// Check if we can knock down wall wallListif( rooms[(int)Math.Floor( walls[wallList].room1 / cols ), walls[wallList].room1 % cols].roomNumber != rooms[(int)Math.Floor( walls[wallList].room2 / cols ), walls[wallList].room2 % cols].roomNumber ){// Calculate which row this wall is in, as well as it's modular index, to determine which room// needs to be updated in the rooms array.currentRow = (int)Math.Floor( wallList / ( cols + cols - 1 ) );modularIndex = wallList - currentRow * ( cols + cols - 1 );// Knock this wall down.walls[wallList].isDown = true;// Set the roomset number of the smaller set to the set number of the larger set.// If they are equal, choosing either one is fine.if( RoomsetCount( rooms[(int)Math.Floor( walls[wallList].room1 / cols ), walls[wallList].room1 % cols].roomNumber, rooms, rows, cols ) >= RoomsetCount( rooms[(int)Math.Floor( walls[wallList].room2 / cols ), walls[wallList].room2 % cols].roomNumber, rooms, rows, cols ) ){//walls[wallList].room2 = walls[wallList].room1;if( modularIndex < cols - 1 ){// This is a vertical wall. Update all the rooms that are in the same roomset as the room on the right.int roomNumber = ( wallList - ( ( cols - 1 ) * currentRow ) ) + 1;UpdateRoomset( rooms[(int)Math.Floor( roomNumber / cols ), roomNumber % cols].roomNumber, rooms[(int)Math.Floor( walls[wallList].room1 / cols ), walls[wallList].room1 % cols].roomNumber, rooms, rows, cols);UpdateWalls( walls,  walls[wallList].room2, walls[wallList].room1 );}else{// This is a horizontal wall. Update all the rooms that are in the same roomset as the room below.int roomNumber = wallList - ( ( cols - 1 ) * ( currentRow + 1 ) ) + cols;UpdateRoomset( rooms[(int)Math.Floor( roomNumber / cols ), roomNumber % cols].roomNumber, rooms[(int)Math.Floor( walls[wallList].room1 / cols ), walls[wallList].room1 % cols].roomNumber, rooms, rows, cols);UpdateWalls( walls, walls[wallList].room2, walls[wallList].room1 );}}else{//walls[wallList].room1 = walls[wallList].room2;if( modularIndex < cols -1 ){//// This is a vertical wall. Update all the rooms that are in the same roomset as the room on the left.int roomNumber = wallList - ( ( cols - 1 ) * currentRow );UpdateRoomset( rooms[(int)Math.Floor( roomNumber / cols ), roomNumber % cols].roomNumber, walls[wallList].room2, rooms, rows, cols);UpdateWalls( walls, walls[wallList].room1, walls[wallList].room2 );} else{// This is a horizontal wall. Update all the rooms that are in the same roomset as the room above.int roomNumber = wallList - ( ( cols - 1 ) * ( currentRow + 1 ) );UpdateRoomset( rooms[(int)Math.Floor( roomNumber / cols ),roomNumber % cols].roomNumber, walls[wallList].room2, rooms, rows, cols );UpdateWalls( walls, walls[wallList].room1, walls[wallList].room2 );}}}}// Output the maze.Console.Write( " " );for( int i = 0; i < cols * 2; i++ ){Console.Write( "_" );}Console.WriteLine();// Loop through each room, and draw it's walls.for( int i = 0; i < rows; i++ ){Console.Write( "|" );for( int j = 0; j < cols; j++){// Draw the walls here. if( rooms[i,j].horizonatalWall >= 0 ){if( !walls[rooms[i,j].horizonatalWall].isDown ){// This is a horizontal wall and is UP.Console.Write( "_" );}else{Console.Write( " " );}}else{Console.Write( "_" );}if( rooms[i,j].verticalWall >= 0 ){if( !walls[rooms[i,j].verticalWall].isDown ){// This is a vertical wall and is UP.Console.Write("|");}else{Console.Write( "_" );}}}Console.WriteLine( "|" );}validInput = false;while( validInput == false ){Console.Write( "Do you want to generate a new maze? [y]es / [n]o : " );answer = Console.ReadLine (  );if( answer == "y" || answer == "yes" ||answer == "n" || answer == "no"    ){validInput = true;if( answer == "n" || answer == "no" ){appDone = true;}}else{Console.WriteLine( "Invalid input." );}}}Console.WriteLine( "Press any key to continue." );Console.Read();}static int RoomsetCount( int roomset, Room[,] rooms, int rows, int cols ){int count = 0;// Check how many rooms are in the set.for( int i = 0; i < rows; i++ ){for( int j = 0; j < cols; j++ ){if( rooms[i,j].roomNumber == roomset ){count++;}}}return count;}static void UpdateRoomset( int roomset, int newRoomset, Room[,] rooms, int rows, int cols ){// Loop through each room, and if it is in the given set, update it to the new set.for( int i = 0; i < rows; i++ ){for( int j = 0; j < cols; j++ ){if( rooms[i, j].roomNumber == roomset ){rooms[i, j].roomNumber = newRoomset;}}}}static void UpdateWalls( Wall[] walls, int changedValue, int newValue ){// Loop through each wall, and if it is pointing at a room that has changed, update it.for( int i = 0; i < walls.Length; i++ ){if( walls.room1 == changedValue ){walls.room1 = newValue;}if( walls.room2 == changedValue ){walls.room2 = newValue;}}}}}
  Thanks for sharing your code. I would say it seems like you did an excellent job of keeping it simple.