<commit_before>

/**
 * Reusable components for each level
 * @param pgame current phaser game instance
 */
ajtxz_hcgame.levelbase = function (pgame) {
    var game = ajtxz_hcgame.game;

    var options = game.options;

    function drawCannon_captain() {

        var cb_x = 10,
            cb_y = (options.height * 0.6),
            cs_x = 20,
            cs_y = (options.height * 0.7) + 10;

        game.captain = game.addAsset(cb_x + 70, cb_y - 10, 'captain');
        pgame.physics.arcade.enable(game.captain);
        game.captain.body.collideWorldBounds = true;


        var cannon_body = game.addAsset(cb_x + 40, cb_y + 20, 'cannon_body')
            .scale.setTo(0.5, 0.5);

        var cannon_stand = game.addAsset(cs_x + 40, cs_y + 20, 'cannon_stand')
            .scale.setTo(0.5, 0.5);

    }

    function drawBackgrounds () {

        game.addAsset(0, 0, 'level_background');
        //game.controlBoard = game.addAsset(0, 480, 'control_board');
        var g = pgame.add.group();
        g.enableBody = true;

        game.controlBoard = g.create(0, pgame.world.height - 110, 'control_board');
        game.controlBoard.body.immovable = true;


        pgame.add.button(660, 500, 'fire_button', function() {
            game.captain.body.gravity.y = 800;
        })
            .scale.setTo(0.70, 0.70);
    }

    this.init = function() {
        drawBackgrounds();
        drawCannon_captain();
    };

    this.defaultUpdate = function() {
        pgame.physics.arcade.collide(game.captain, game.controlBoard);
    }

};<commit_msg>hardcode firing numbers<commit_after>

/**
 * Reusable components for each level
 * @param pgame current phaser game instance
 */
ajtxz_hcgame.levelbase = function (pgame) {
    var game = ajtxz_hcgame.game;

    var options = game.options;

    function drawCannon_captain() {

        var cb_x = 10,
            cb_y = (options.height * 0.6),
            cs_x = 20,
            cs_y = (options.height * 0.7) + 10;

        game.captain = game.addAsset(cb_x + 70, cb_y - 10, 'captain');

        var cannon_body = game.addAsset(cb_x + 40, cb_y + 20, 'cannon_body')
            .scale.setTo(0.5, 0.5);

        var cannon_stand = game.addAsset(cs_x + 40, cs_y + 20, 'cannon_stand')
            .scale.setTo(0.5, 0.5);

    }

    function drawBackgrounds () {

        game.addAsset(0, 0, 'level_background');
        //game.controlBoard = game.addAsset(0, 480, 'control_board');
        var g = pgame.add.group();
        g.enableBody = true;

        game.controlBoard = g.create(0, pgame.world.height - 110, 'control_board');
        game.controlBoard.body.immovable = true;


        pgame.add.button(660, 500, 'fire_button', function() {
            game.captain.body.gravity.y = 800;
            game.captain.body.velocity.setTo(500, -800);

        }).scale.setTo(0.70, 0.70);
    }

    this.init = function() {
        drawBackgrounds();
        drawCannon_captain();

        pgame.physics.arcade.enable(game.captain);
        game.captain.body.collideWorldBounds = true;
        game.captain.body.bounce.y = 0.3;

    };

    this.defaultUpdate = function() {
        pgame.physics.arcade.collide(game.captain, game.controlBoard);
    }

};
{'fraction_non_alphanumeric': 0.1379525593008739, 'fraction_numerical': 0.03682896379525593, 'mean_word_length': 2.2082082082082084, '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': '626764', 'n_tokens_mistral': 1230, 'n_tokens_neox': 1085, 'n_words': 204}