function renderBoard(board) {
    var strHTML = '';
    for (var i = 0; i < gLevel.SIZE; i++) {
        strHTML += '<tr>\n';

        for (var j = 0; j < gLevel.SIZE; j++) {
            var currCell = board[i][j]
            var id = `${'r' + i + 'c' + j}`
            var cellColor = renderCellContent(currCell) === '-' ? "grey" : "transparent";
            strHTML += `\t<td id=${id} style="background-color:${cellColor}" onmousedown="cellMarked(${i},${j})" onclick="cellClicked(${id}, ${i},${j})">${renderCellContent(currCell, id)} </td>
            \n`;
        }
        strHTML += '</tr>\n';
    }
    var elBoard = document.querySelector('.board');
    elBoard.innerHTML = strHTML;
}
// Render the board as a <table> to the page
Render the board as a  to the page
Render the board as a to the page
function renderBoard(board) {
    var strHTML = '';
    for (var i = 0; i < gLevel.SIZE; i++) {
        strHTML += '<tr>\n';
        for (var j = 0; j < gLevel.SIZE; j++) {
            var currCell = board[i][j]
            var id = `${'r' + i + 'c' + j}`
            var cellColor = renderCellContent(currCell) === '-' ? "grey" : "transparent";
            strHTML += `\t<td id=${id} style="background-color:${cellColor}" onmousedown="cellMarked(${i},${j})" onclick="cellClicked(${id}, ${i},${j})">${renderCellContent(currCell, id)} </td>
            \n`;
        }
        strHTML += '</tr>\n';
    }
    var elBoard = document.querySelector('.board');
    elBoard.innerHTML = strHTML;
}
function renderBoard ( board ) { var strHTML = '' ; for ( var i = 0 ; i < gLevel . SIZE ; i ++ ) { strHTML += '<tr>\n' ; for ( var j = 0 ; j < gLevel . SIZE ; j ++ ) { var currCell = board [ i ] [ j ] var id = ` ${ 'r' + i + 'c' + j } ` var cellColor = renderCellContent ( currCell ) === '-' ? "grey" : "transparent" ; strHTML += ` \t ${ id } ${ cellColor } ${ i } ${ j } ${ id } ${ i } ${ j } ${ renderCellContent ( currCell , id ) } \n ` ; } strHTML += '</tr>\n' ; } var elBoard = document . querySelector ( '.board' ) ; elBoard . innerHTML = strHTML ; }
Render the board as a <table> to the page
Render the board as a <table > to the page