public final void setWalls(){
        
        for (int i=0; i < width; i++){
            
            grid[i][0].setUpWall();
            grid[i][height-1].setDownWall();
            
        }
        
        for (int i=0; i < height; i++){
            
            grid[0][i].setLeftWall();
            grid[width-1][i].setRightWall();
            
        }
        
        Node currentNode;
        
        for (int i = 1; i < (width-1); i++){
            
            for (int j = 1; j < (height-1); j++){
                
                currentNode = grid[i][j];
                while (currentNode.canSetWall()){
                    
                    switch (random()){                                                  
                         
                        case 0:
                            currentNode.setRightWall();
                            break;
                        case 1:
                            currentNode.setUpWall();
                            break;
                        case 2:
                            currentNode.setLeftWall();
                            break;
                        case 3:
                            currentNode.setDownWall();
                            break;
                            
                    }
                    
                }
                
            }
            
        }
        
    }