private static void PopulateMaze(Maze maze, Random rand, int numCells)
        {
            Stack <MazeCell> cellStack = new Stack <MazeCell>();
            int      x    = rand.Next(0, numCells);
            int      y    = rand.Next(0, numCells);
            MazeCell cell = maze.GetCell(x, y);

            MazeBuilder.VisitCell(cell, cellStack, maze, rand);
        }
        private static void VisitCell(MazeCell cell, Stack <MazeCell> cellStack, Maze maze, Random rand)
        {
            cell.Visited = true;
            MazeCell mazeCell = maze.GetNextNeighbour(cell, rand);

            if (mazeCell != null)
            {
                MazeCell.RemoveWalls(cell, mazeCell);
                cellStack.Push(cell);
                MazeBuilder.VisitCell(mazeCell, cellStack, maze, rand);
            }
            else if (cellStack.Count > 0)
            {
                mazeCell = cellStack.Pop();
                MazeBuilder.VisitCell(mazeCell, cellStack, maze, rand);
            }
        }