function housingGrid(rows, columns) {
    let hGrid = document.createElement('table');
    hGrid.className = 'grid';

    for(let currentRow = 0; currentRow < rows; currentRow++) {
        let tableRow = hGrid.
            appendChild(document.createElement('tr'));

        for(let currentCol = 0; currentCol < columns; currentCol++) {
            let tableCell = tableRow.
                appendChild(document.createElement('td'));

            tableCell.addEventListener('click', increaseGridSlot, false);
            tableCell.addEventListener('contextmenu', decreaseGridSlot, false);
            tableCell.myRow = currentRow;
            tableCell.myCol = currentCol;

            hGridArray[currentRow][currentCol] = 0;
        }
    }
    return hGrid;
}
//for selection of specific cells.
for selection of specific cells.
for selection of specific cells .
function housingGrid(rows, columns) {
    let hGrid = document.createElement('table');
    hGrid.className = 'grid';
    for(let currentRow = 0; currentRow < rows; currentRow++) {
        let tableRow = hGrid.
            appendChild(document.createElement('tr'));
        for(let currentCol = 0; currentCol < columns; currentCol++) {
            let tableCell = tableRow.
                appendChild(document.createElement('td'));
            tableCell.addEventListener('click', increaseGridSlot, false);
            tableCell.addEventListener('contextmenu', decreaseGridSlot, false);
            tableCell.myRow = currentRow;
            tableCell.myCol = currentCol;
            hGridArray[currentRow][currentCol] = 0;
        }
    }
    return hGrid;
}
function housingGrid ( rows , columns ) { let hGrid = document . createElement ( 'table' ) ; hGrid . className = 'grid' ; for ( let currentRow = 0 ; currentRow < rows ; currentRow ++ ) { let tableRow = hGrid . appendChild ( document . createElement ( 'tr' ) ) ; for ( let currentCol = 0 ; currentCol < columns ; currentCol ++ ) { let tableCell = tableRow . appendChild ( document . createElement ( 'td' ) ) ; tableCell . addEventListener ( 'click' , increaseGridSlot , false ) ; tableCell . addEventListener ( 'contextmenu' , decreaseGridSlot , false ) ; tableCell . myRow = currentRow ; tableCell . myCol = currentCol ; hGridArray [ currentRow ] [ currentCol ] = 0 ; } } return hGrid ; }
for selection of specific cells.
for selection of specific cells .