Esempio n. 1
0
		public void InitializeRoomCells()
		{
			for (var row = 0; row < Rows; row++)
			{
				for (var column = 0; column < Columns; column++)
				{
					var cell = new Cell();

					cell.NorthSide = (row == 0) ? SideType.Wall : SideType.Empty;
					cell.SouthSide = (row == Rows - 1) ? SideType.Wall : SideType.Empty;
					cell.WestSide = (column == 0) ? SideType.Wall : SideType.Empty;
					cell.EastSide = (column == Columns - 1) ? SideType.Wall : SideType.Empty;

					this[row, column] = cell;
				}
			}
		}
Esempio n. 2
0
		public void MarkCellsUnvisited()
		{
			for (var row = 0; row < Rows; row++)
			{
				for (var column = 0; column < Columns; column++)
				{
					this[row, column] = new Cell();
				}
			}
			_visitedCells.Clear();
		}