<commit_before>{{!< default}}
{{!-- 
/**
 * Emerging Citizens
 * Developed by Engagement Lab, 2016
 * ==============
 * 
 * Script includes partial for MODERATOR socket.io events
 * ==========
 */
--}}			

var socketEvents = function(eventId, eventData) {
		
	var currentPlayers = [];
    var clockInterval;

    switch (eventId) {

        case 'connect':

			   // Connected, let's sign-up for to receive messages for this room
			   socket.emit('room', emitData('moderator'));
               
            break;

        case 'players:update':

                var staticPlayers = $('.player-static');
			  	currentPlayers = _.pluck(eventData, 'username');

                // Allow to start?
                if(currentPlayers.length == 1)
                {
                    var startAnim = new TimelineLite();
                    startAnim.from($('#btn-start-game'), 1, {scale:0, autoAlpha: 0, ease:Elastic.easeOut})
                }

    		    // $('#playersContent').html(currentPlayers.join('<p> joined. </p><br />'));

                _.each(currentPlayers, function(name, index) {

                    var nameFormatted = (name.length <= 15) ? name : name.substring(0, 15) + "...";

                    $(staticPlayers[index]).children('.icon').addClass('active');
                    $(staticPlayers[index]).children('.nameplate').addClass('active').text(nameFormatted);
                });

            break;
            <commit_msg>player start limit<commit_after>{{!< default}}
{{!-- 
/**
 * Emerging Citizens
 * Developed by Engagement Lab, 2016
 * ==============
 * 
 * Script includes partial for MODERATOR socket.io events
 * ==========
 */
--}}			

var socketEvents = function(eventId, eventData) {
		
	var currentPlayers = [];
    var clockInterval;

    switch (eventId) {

        case 'connect':

			   // Connected, let's sign-up for to receive messages for this room
			   socket.emit('room', emitData('moderator'));
               
            break;

        case 'players:update':

                var staticPlayers = $('.player-static');
			  	currentPlayers = _.pluck(eventData, 'username');

                // Allow to start?
                if(currentPlayers.length === 2)
                {
                    var startAnim = new TimelineLite();
                    startAnim.from($('#btn-start-game'), 1, {scale:0, autoAlpha: 0, ease:Elastic.easeOut})
                }

    		    // $('#playersContent').html(currentPlayers.join('<p> joined. </p><br />'));

                _.each(currentPlayers, function(name, index) {

                    var nameFormatted = (name.length <= 15) ? name : name.substring(0, 15) + "...";

                    $(staticPlayers[index]).children('.icon').addClass('active');
                    $(staticPlayers[index]).children('.nameplate').addClass('active').text(nameFormatted);
                });

            break;
            
{'fraction_non_alphanumeric': 0.16356749311294766, 'fraction_numerical': 0.008953168044077135, 'mean_word_length': 1.8963110667996013, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4324469', 'n_tokens_mistral': 873, 'n_tokens_neox': 742, 'n_words': 162}