<commit_before>
var game = (function () {
    "use strict";

    function getInitialState () {
        return {
            paddles: [0, 0],
            ball: {x:0, y:0, vx:0.01, vy:0.005}
        };
    }

    function stepper (input, state) {
        return {
            paddles: [
                state.paddles[0] + 0.05*input.players[0],
                state.paddles[1] + 0.05*input.players[1]
            ],
            ball: {
                 x: state.ball.x + state.ball.vx,
                 y: state.ball.y + state.ball.vy,
                vx: state.ball.vx,
                vy: state.ball.vy
            }
        };
    }

    return {
        init: getInitialState,
        step: stepper,
        dt: 34
    };

})();<commit_msg>Made ball bounce off walls<commit_after>
var game = (function () {
    "use strict";

    function getInitialState () {
        return {
            paddles: [0, 0],
            ball: {x:0, y:0, vx:0.01, vy:0.005}
        };
    }

    function stepper (input, state)
    {
        var ns = {
            paddles: [
                state.paddles[0] + 0.05*input.players[0],
                state.paddles[1] + 0.05*input.players[1]
            ],
            ball: {
                 x: state.ball.x + state.ball.vx,
                 y: state.ball.y + state.ball.vy,
                vx: state.ball.vx,
                vy: state.ball.vy
            }
        };

        if (ns.ball.x < -1) ns.ball.vx =  Math.abs (ns.ball.vx);
        if (ns.ball.x >  1) ns.ball.vx = -Math.abs (ns.ball.vx);
        if (ns.ball.y < -1) ns.ball.vy =  Math.abs (ns.ball.vy);
        if (ns.ball.y >  1) ns.ball.vy = -Math.abs (ns.ball.vy);

        return ns;
    }

    return {
        init: getInitialState,
        step: stepper,
        dt: 33
    };

})();
{'fraction_non_alphanumeric': 0.15005599104143338, 'fraction_numerical': 0.027995520716685332, 'mean_word_length': 1.1980319803198032, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3640804', 'n_tokens_mistral': 666, 'n_tokens_neox': 617, 'n_words': 121}