function initBoard(){
    var cell = $(".game-board");
    if( cell.hasClass("btn-success") ) {
        cell.removeClass("btn-success").addClass("btn-primary");
    }
    for(var i=1; i < 10; i++)
    {
        $("#" + i).bind("click", playMove);
    }
    $("#delete").bind("click", playMove);
}
/* Initialize the main board.
 * Change success button (green) to reset state (blue).
 * Also bind the clicks back to buttons.
 * ------------------------------------------------------------------------- */
Initialize the main board.
Change success button (green) to reset state (blue).
Also bind the clicks back to buttons.
Initialize the main board . Change success button ( green ) to reset state ( blue ) . Also bind the clicks back to buttons .
function initBoard(){
    var cell = $(".game-board");
    if( cell.hasClass("btn-success") ) {
        cell.removeClass("btn-success").addClass("btn-primary");
    }
    for(var i=1; i < 10; i++)
    {
        $("#" + i).bind("click", playMove);
    }
    $("#delete").bind("click", playMove);
}
function initBoard ( ) { var cell = $ ( ".game-board" ) ; if ( cell . hasClass ( "btn-success" ) ) { cell . removeClass ( "btn-success" ) . addClass ( "btn-primary" ) ; } for ( var i = 1 ; i < 10 ; i ++ ) { $ ( "#" + i ) . bind ( "click" , playMove ) ; } $ ( "#delete" ) . bind ( "click" , playMove ) ; }
Initialize the main board.
Initialize the main board .