public void paintComponent(Graphics g) {
        x_cord = 40;
        y_cord = 40;
        // could have taken height as well as width
        // just need something to base the roomsize
        roomSize = (width - x_cord) / width + 30;

        // temp variables used for painting
        int x = x_cord;
        int y = y_cord;

        for (int i = 0; i <= height - 1; i++) {
            for (int j = 0; j <= width - 1; j++) {
                if (!(rooms[i][j].north.isGone)) {
                    g.drawLine(x, y, x + roomSize, y);
                }//end of north if
                // west wall not there draw the line
                if (rooms[i][j].west.isGone == false) {
                    g.drawLine(x, y, x, y + roomSize);
                }// end of west if
                if ((i == height - 1) && rooms[i][j].south.isGone == false) {
                    g.drawLine(x, y + roomSize, x + roomSize,
                            y + roomSize);
                }// end of south if
                if ((j == width - 1) && rooms[i][j].east.isGone == false) {
                    g.drawLine(x + roomSize, y, x + roomSize,
                            y + roomSize);
                }// end of east if
                x += roomSize;// change the horizontal
            }// end of inner for loop
            x = x_cord;
            y += roomSize;
        }// end of outer for loop
   }