function gamePolling(){
$.ajax({
url: "/game/<%=game.id%>/update",
dataType: 'json',
cache: false,
success: function(data){
if (data.update == true){
window.location.reload();
}
else{
gamePolling();
}
},
error: function(data, type){
gamePolling();
}
});
}