function resetBoard() {

    // Remove all the disabled buttons and the styles

    for (var i = 0; i < buttons.length; i++) {
        buttons[i].disabled = false;
        buttons[i].classList.remove("btn-player-1");
        buttons[i].classList.remove("btn-player-2");
    }


    // Player Number is changed to 1

    playerNumber = 1;
    playerType.textContent = "Player - 1";


    // Filled Cells is changed to 0

    filledCells = 0;


    // Filling the Board with -1

    for (var i = 0; i < 6; i++) {
        for (var j = 0; j < 7; j++) {
            filledGrid[i][j] = -1;
        }
    }

}
// Function to reset the Board completely
Function to reset the Board completely
Function to reset the Board completely
function resetBoard() {
    for (var i = 0; i < buttons.length; i++) {
        buttons[i].disabled = false;
        buttons[i].classList.remove("btn-player-1");
        buttons[i].classList.remove("btn-player-2");
    }
    playerNumber = 1;
    playerType.textContent = "Player - 1";
    filledCells = 0;
    for (var i = 0; i < 6; i++) {
        for (var j = 0; j < 7; j++) {
            filledGrid[i][j] = -1;
        }
    }
}
function resetBoard ( ) { for ( var i = 0 ; i < buttons . length ; i ++ ) { buttons [ i ] . disabled = false ; buttons [ i ] . classList . remove ( "btn-player-1" ) ; buttons [ i ] . classList . remove ( "btn-player-2" ) ; } playerNumber = 1 ; playerType . textContent = "Player - 1" ; filledCells = 0 ; for ( var i = 0 ; i < 6 ; i ++ ) { for ( var j = 0 ; j < 7 ; j ++ ) { filledGrid [ i ] [ j ] = - 1 ; } } }
Function to reset the Board completely
Function to reset the Board completely
// Remove all the disabled buttons and the styles // Player Number is changed to 1 // Filled Cells is changed to 0 // Filling the Board with -1