<commit_before>var room = 'looping';
var socket = io.connect('http://localhost');

// join room
socket.emit('join', { room: room});

socket.on('maximum reached', function(data) {
    // display maximum players reached message
    alert('only ' + data.maxConnections + ' players can play together');
});

// socket.emit('leave', { room: room});

var controller = {
    pickedChicken: function() {
        socket.emit('score', { room: room });
    },
    
    isAboutLeaving: function(data) {
        data.room = room;
        socket.emit('end', data);
    }    

};

var louie = new Louis(controller);

socket.on('start', function (data) {
    louie.arrives(data);
});


// receive
socket.on('position', function (data) {
    // update position (status bar)
    console.log('update position to ' + data.id);
});


socket.on('state', function (data) {
    // update state -> redraw players etc.
    console.log('update state');
});


window.onload = function() {    
    
    var canvas = document.getElementById('canvas-louie');
    paper.setup(canvas);
    var view = paper.view;    
    var tool = new paper.Tool();
        
    
    view.onFrame = function() {   
        louie.updatePosition(view);
    };
    
    tool.onMouseDrag = function(event) {
        louie.push(event.delta);
    };
    
}
	
<commit_msg>fix typo and initialization order<commit_after>var room = 'looping';
var socket = io.connect('http://localhost');

// join room
socket.emit('join', { room: room});

socket.on('maximum reached', function(data) {
    // display maximum players reached message
    alert('only ' + data.maxConnections + ' players can play together');
});

// socket.emit('leave', { room: room});

var controller = {
    pickedChicken: function() {
        socket.emit('score', { room: room });
    },
    
    isAboutLeaving: function(data) {
        data.room = room;
        socket.emit('end', data);
    }    

};


window.onload = function() {    
    
    var canvas = document.getElementById('canvas-louie');
    paper.setup(canvas);
    var view = paper.view;    
    var tool = new paper.Tool();

    var louie = new Louie(controller);
        
    view.onFrame = function() {   
        louie.updatePosition(view);
    };
    
    tool.onMouseDrag = function(event) {
        louie.push(event.delta);
    };
    

    
    
    socket.on('start', function (data) {
        louie.arrives(data);
    });
    
    
    // receive
    socket.on('position', function (data) {
        // update position (status bar)
        console.log('update position to ' + data.id);
    });
    
    
    socket.on('state', function (data) {
        // update state -> redraw players etc.
        console.log('update state');
    });
    
    
}
	

{'fraction_non_alphanumeric': 0.15648994515539305, 'fraction_numerical': 0.0, 'mean_word_length': 2.386138613861386, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1951011', 'n_tokens_mistral': 843, 'n_tokens_neox': 837, 'n_words': 184}