game-client.js
function drawGame() {
    getPlayers();
    getBoard();
    getPiecesLeft();
    $(SIDEBOARD).append("<hr/>");
    $(SIDEBOARD).append($(CHATPNL));
    $(CHATPNL).addClass('game_chat_panel');
    $(LEAVEGAME)[0].onclick = function () {
        clearTimeout(GETPLAYERSTID);
        $.ajax({
            type: 'DELETE',
            url: "/games/" + enc($.cookie("game")) + "/players",
            data: {name: $.cookie("player")},
            success: function() {
                $.removeCookie('game');
                location.reload();
            }
        });
    };

    // setup future calls
    function pollPlayers() {
        getPlayers();
        GETPLAYERSTID = setTimeout(pollPlayers, 2000);
    }
    GETPLAYERSTID = setTimeout(pollPlayers, 2000);
}
function drawGame() {
    getPlayers();
    getBoard();
    getPiecesLeft();
    $(SIDEBOARD).append("<hr/>");
    $(SIDEBOARD).append($(CHATPNL));
    $(CHATPNL).addClass('game_chat_panel');
    $(LEAVEGAME)[0].onclick = function () {
        clearTimeout(GETPLAYERSTID);
        $.ajax({
            type: 'DELETE',
            url: "/games/" + enc($.cookie("game")) + "/players",
            data: {name: $.cookie("player")},
            success: function() {
                $.removeCookie('game');
                location.reload();
            }
        });
    };

    // setup future calls
    function pollPlayers() {
        getPlayers();
        GETPLAYERSTID = setTimeout(pollPlayers, 2000);
    }
    GETPLAYERSTID = setTimeout(pollPlayers, 2000);
}
function drawGame ( ) { getPlayers ( ) ; getBoard ( ) ; getPiecesLeft ( ) ; $ ( SIDEBOARD ) . append ( "<hr/>" ) ; $ ( SIDEBOARD ) . append ( $ ( CHATPNL ) ) ; $ ( CHATPNL ) . addClass ( 'game_chat_panel' ) ; $ ( LEAVEGAME ) [ 0 ] . onclick = function ( ) { clearTimeout ( GETPLAYERSTID ) ; $ . ajax ( { type : 'DELETE' , url : "/games/" + enc ( $ . cookie ( "game" ) ) + "/players" , data : { name : $ . cookie ( "player" ) } , success : function ( ) { $ . removeCookie ( 'game' ) ; location . reload ( ) ; } } ) ; } ; // setup future calls function pollPlayers ( ) { getPlayers ( ) ; GETPLAYERSTID = setTimeout ( pollPlayers , 2000 ) ; } GETPLAYERSTID = setTimeout ( pollPlayers , 2000 ) ; }
Draw the game.
Draw the game .