<commit_before>var getScore = function(){
	return {
		a: Math.floor((Math.random()*11)+1),
		b: Math.floor((Math.random()*11)+1)
	}
}

$(function(){
	var ractiveScore = new Ractive({
		el: 'score',
		template: '#scoreTemplate',
		data: {
			score: {
				a: 0,
				b: 0
			}
		}
	});

	setInterval(function(){
		var score = getScore();
		ractiveScore.set('score', score);
	}, 1000);
});<commit_msg>GUI talks with server<commit_after>var url = "http://localhost:3000";

var updateStatus = function(callback){
	$.get(url + "/status", function(data){
		callback(data);
	});
};

var startGame = function(){
	$.post(url + "/start");
};

var stopGame = function(){
	$.post(url + "/stop");
};

$(function(){
	var ractiveScore = new Ractive({
		el: 'score',
		template: '#scoreTemplate',
		data: {
			score: {
				a: 0,
				b: 0
			}
		}
	});

	setInterval(function(){
		updateStatus(function (status){
			ractiveScore.set('score', status.score);
		});
	}, 1000);
});
{'fraction_non_alphanumeric': 0.21189979123173278, 'fraction_numerical': 0.022964509394572025, 'mean_word_length': 3.7241379310344827, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4167653', 'n_tokens_mistral': 406, 'n_tokens_neox': 347, 'n_words': 74}