<commit_before>/*
* @author             <NAME> <<EMAIL>>
* @copyright          2016 <NAME>
* @licence            {@link https://creativecommons.org/publicdomain/zero/1.0/deed.fr|CC0 1.0}
*/

function preload() {

    game.load.image('ground', 'assets/platform.png');
    game.load.image('rolling', 'assets/rolling.png');
    game.load.image('fire', 'assets/fire.png');

}

var player;
var round, square;
var wall;
var cursors;
var background;
var accelerator = 0;
const accel_go  = 10;

function create() {
    //  We're going to be using physics, so enable the Arcade Physics system
    // TODO: maybe use another mode...
    game.physics.startSystem(Phaser.Physics.ARCADE);

    //  A simple background for our game
    background = game.make.bitmapData(800, 600);
    background.addToWorld();
    var grd = background.context.createLinearGradient(400,0,400,600);
    grd.addColorStop(0, '#8ED6FF');
    grd.addColorStop(1, '#003BA2');

    background.cls();
    background.rect(0,0,800,600, grd);
    background.fill();

    //  The wall group contain ground and wall
    wall = game.add.group();
    wall.enableBody = true;     // For physics

    // Here we create the ground.
    var ground = wall.create(0, game.world.height - 64, 'ground');

    //  This stops it from falling away when you jump on it
    ground.body.immovable = true;

    //  Now let's create two ledges
    var ledge = wall.create(400, 400, 'ground');
    ledge.body.immovable = true;

    ledge = wall.create(-150, 250, 'ground');
    ledge.body.immovable = true;

    // The player and its settings
    player = game.add.sprite(32, game.world.height - 150, 'rolling');

    //  We need to enable physics on the player
    game.physics.arcade.enable(player);

    //  Player physics properties. Give the little guy a slight bounce.
    player.body.bounce.y = 0.9;
    player.body.gravity.y = 300;<commit_msg>bouncnig on wall<commit_after>/*
* @author             <NAME> <<EMAIL>>
* @copyright          2016 <NAME>
* @licence            {@link https://creativecommons.org/publicdomain/zero/1.0/deed.fr|CC0 1.0}
*/

function preload() {

    game.load.image('ground', 'assets/platform.png');
    game.load.image('rolling', 'assets/rolling.png');
    game.load.image('fire', 'assets/fire.png');

}

var player;
var round, square;
var wall;
var cursors;
var background;
var accelerator = 0;
const accel_go  = 10;

function create() {
    //  We're going to be using physics, so enable the Arcade Physics system
    // TODO: maybe use another mode...
    game.physics.startSystem(Phaser.Physics.ARCADE);

    //  A simple background for our game
    background = game.make.bitmapData(800, 600);
    background.addToWorld();
    var grd = background.context.createLinearGradient(400,0,400,600);
    grd.addColorStop(0, '#8ED6FF');
    grd.addColorStop(1, '#003BA2');

    background.cls();
    background.rect(0,0,800,600, grd);
    background.fill();

    //  The wall group contain ground and wall
    wall = game.add.group();
    wall.enableBody = true;     // For physics

    // Here we create the ground.
    var ground = wall.create(0, game.world.height - 64, 'ground');

    //  This stops it from falling away when you jump on it
    ground.body.immovable = true;

    //  Now let's create two ledges
    var ledge = wall.create(400, 400, 'ground');
    ledge.body.immovable = true;

    ledge = wall.create(-150, 250, 'ground');
    ledge.body.immovable = true;

    // The player and its settings
    player = game.add.sprite(32, game.world.height - 150, 'rolling');

    //  We need to enable physics on the player
    game.physics.arcade.enable(player);

    //  Player physics properties. Give the little guy a slight bounce.
    player.body.bounce.y = 0.9;
    player.body.bounce.x = 0.9;
    player.body.gravity.y = 300;
{'fraction_non_alphanumeric': 0.13914413231819375, 'fraction_numerical': 0.036755053819900234, 'mean_word_length': 2.825301204819277, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 2, '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': '148040', 'n_tokens_mistral': 1356, 'n_tokens_neox': 1219, 'n_words': 333}