<commit_before>game.WinScreen = me.ScreenObject.extend({
    // constructor
    init: function() {
        this.parent(true);
 
        // title screen image
        this.title = null;
 
        this.font = null;
        this.scrollerfont = null;
        this.scrollertween = null;
 
        this.scroller = null;
        this.scrollerpos = 600;
    },
 
    // reset function
    onResetEvent: function() {
        if (this.title == null) {
            // init stuff if not yet done
            this.title = me.loader.getImage("title_screen");
        }
        if (this.font == null) {
            // font to display the menu items
            this.font = new me.BitmapFont("32x32_font", 32);
 
            // set the scroller
            this.scrollerfont = new me.BitmapFont("32x32_font", 32);
        }
 
        // reset to default value
        this.scrollerpos = 640;
 
        // a tween to animate the arrow
        this.scrollertween = new me.Tween(this).to({
            scrollerpos: -2200
        }, 10000).onComplete(this.scrollover.bind(this)).start();
 
        // enable the keyboard
        me.input.bindKey(me.input.KEY.ENTER, "enter", true);
 
        // play something
        me.audio.play("win");
        me.audio.stopTrack();
    },
 
    // some callback for the tween objects
    scrollover: function() {
        // reset to default value
        this.scrollerpos = 640;
        this.scrollertween.to({
            scrollerpos: -2200
        }, 10000).onComplete(this.scrollover.bind(this)).start();
    },
 
    // update function
    update: function() {
        lives = initialLives;
        // enter pressed ?
        if (me.input.isKeyPressed('enter')) {
            me.state.set(me.state.CREDITS, new game.CreditsScreen());
            me.state.change(me.state.CREDITS);
        }
        return true;
    },
 
    // draw function
    draw: function(context) {
        context.drawImage(this.title, 0, 0);
    },
 
    // destroy function
    onDestroyEvent: function() {
        me.input.unbindKey(me.input.KEY.ENTER);
 
        //just in case
        this.scrollertween.stop();
    }
 
});<commit_msg>credits after win<commit_after>game.WinScreen = me.ScreenObject.extend({
    // constructor
    init: function() {
        this.parent(true);
 
        // title screen image
        this.title = null;
 
        this.font = null;
        this.scrollerfont = null;
        this.scrollertween = null;
 
        this.scroller = null;
        this.scrollerpos = 600;
    },
 
    // reset function
    onResetEvent: function() {
        if (this.title == null) {
            // init stuff if not yet done
            this.title = me.loader.getImage("team_screen");
        }
        if (this.font == null) {
            // font to display the menu items
            this.font = new me.BitmapFont("32x32_font", 32);
 
            // set the scroller
            this.scrollerfont = new me.BitmapFont("32x32_font", 32);
        }
 
        // reset to default value
        this.scrollerpos = 640;
 
        // a tween to animate the arrow
        this.scrollertween = new me.Tween(this).to({
            scrollerpos: -2200
        }, 10000).onComplete(this.scrollover.bind(this)).start();
 
        // enable the keyboard
        //me.input.bindKey(me.input.KEY.ENTER, "enter", true);
 
        // play something
        me.audio.play("win");
        me.audio.stopTrack();
    },
 
    // some callback for the tween objects
    scrollover: function() {
        // reset to default value
        this.scrollerpos = 640;
        this.scrollertween.to({
            scrollerpos: -2200
        }, 10000).onComplete(this.scrollover.bind(this)).start();
    },
 
    // update function
    update: function() {
        lives = initialLives;
        document.onkeypress = function() {
            me.state.change(me.state.MENU);
        }
        return true;
    },
 
    // draw function
    draw: function(context) {
        context.drawImage(this.title, 0, 0);
    },
 
    // destroy function
    onDestroyEvent: function() {
        //me.input.unbindKey(me.input.KEY.ENTER);
        document.onkeypress = null;
 
        //just in case
        this.scrollertween.stop();
    }
 
});
{'fraction_non_alphanumeric': 0.12559354226020894, 'fraction_numerical': 0.0194681861348528, 'mean_word_length': 1.6989109545163357, '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': '3552819', 'n_tokens_mistral': 1330, 'n_tokens_neox': 1204, 'n_words': 267}