<commit_before>namespace Flappy {
    interface IScoreBoardParams {
        gameOverKey: string;
        scoreBoardKey: string;
        wooshSoundKey: string;
        replayButtonKey: string;
        bronzeMedalKey: string;
        silverMedalKey: string;
        goldMedalKey: string;
        platinumMedalKey: string;
    }

    export class ScoreBoard extends Phaser.Group {

        private gameOver: Phaser.Sprite;
        private wooshSound: Phaser.Sound;
        private scoreWindow: ScoreWindow;
        private replayButton: ReplayButton;
        private gameOverStatus: boolean;

        constructor(game: Phaser.Game, params: IScoreBoardParams, restartGameLambda: Function) {
            super(game);

            this.gameOver = new Phaser.Sprite(game, Global.Constants.gameWidth / 2, Global.Constants.gameHeight / 2 - 100, params.gameOverKey);
            this.gameOver.anchor.set(0.5, 0.5);
            this.gameOver.alpha = 0;
            this.add(this.gameOver);

            this.scoreWindow = new ScoreWindow(game, Global.Constants.gameWidth / 2, Global.Constants.gameHeight / 2, {
                bronzeMedalKey: params.bronzeMedalKey,
                goldMedalKey: params.goldMedalKey,
                platinumMedalKey: params.platinumMedalKey,
                scoreWindowKey: params.scoreBoardKey,
                silverMedalKey: params.silverMedalKey,
            });
            this.scoreWindow.alpha = 0;
            this.add(this.scoreWindow);

            this.replayButton = new ReplayButton(game, Global.Constants.gameWidth / 2, Global.Constants.gameHeight / 2 + 70, params.replayButtonKey);
            this.replayButton.alpha = 0;
            this.replayButton.events.onInputDown.add(() => {
                restartGameLambda();
                this.gameOverStatus = false;
                this.gameOver.alpha = 0;
                this.scoreWindow.alpha = 0;
                this.replayButton.alpha = 0;
                this.replayButton.inputEnabled = false;
            });
            this.add(this.replayButton);

            this.wooshSound = game.add.audio(params.wooshSoundKey);

            this.fixedToCamera = true;
        }

        public show(score: number): void {
            this.gameOverStatus = true;
            this.scoreWindow.score = score;

            this.gameOver.y = Global.Constants.gameHeight / 2 - 80;
            let gameOverTween = this.game.add.tween(this.gameOver).to({ alpha: 1, y: Global.Constants.gameHeight / 2 - 100 }, 500, Phaser.Easing.Exponential.Out, true, 500);
            gameOverTween.onStart.add(() => {
                this.wooshSound.play();
            });

            this.scoreWindow.y = Global.Constants.gameHeight / 2 + 20;
            let scoreBoardTween = this.game.add.tween(this.scoreWindow).to({ alpha: 1, y: Global.Constants.gameHeight / 2 }, 500, Phaser.Easing.Exponential.Out, true, 1500);
            scoreBoardTween.onStart.add(() => {
                this.wooshSound.play();
            });<commit_msg>made a timeout to activate game over to fix bug<commit_after>namespace Flappy {
    interface IScoreBoardParams {
        gameOverKey: string;
        scoreBoardKey: string;
        wooshSoundKey: string;
        replayButtonKey: string;
        bronzeMedalKey: string;
        silverMedalKey: string;
        goldMedalKey: string;
        platinumMedalKey: string;
    }

    export class ScoreBoard extends Phaser.Group {

        private gameOver: Phaser.Sprite;
        private wooshSound: Phaser.Sound;
        private scoreWindow: ScoreWindow;
        private replayButton: ReplayButton;
        private gameOverStatus: boolean;

        constructor(game: Phaser.Game, params: IScoreBoardParams, restartGameLambda: Function) {
            super(game);

            this.gameOver = new Phaser.Sprite(game, Global.Constants.gameWidth / 2, Global.Constants.gameHeight / 2 - 100, params.gameOverKey);
            this.gameOver.anchor.set(0.5, 0.5);
            this.gameOver.alpha = 0;
            this.add(this.gameOver);

            this.scoreWindow = new ScoreWindow(game, Global.Constants.gameWidth / 2, Global.Constants.gameHeight / 2, {
                bronzeMedalKey: params.bronzeMedalKey,
                goldMedalKey: params.goldMedalKey,
                platinumMedalKey: params.platinumMedalKey,
                scoreWindowKey: params.scoreBoardKey,
                silverMedalKey: params.silverMedalKey,
            });
            this.scoreWindow.alpha = 0;
            this.add(this.scoreWindow);

            this.replayButton = new ReplayButton(game, Global.Constants.gameWidth / 2, Global.Constants.gameHeight / 2 + 70, params.replayButtonKey);
            this.replayButton.alpha = 0;
            this.replayButton.events.onInputDown.add(() => {
                restartGameLambda();
                setTimeout(() => {
                    this.gameOverStatus = false;
                }, 500);
                this.gameOver.alpha = 0;
                this.scoreWindow.alpha = 0;
                this.replayButton.alpha = 0;
                this.replayButton.inputEnabled = false;
            });
            this.add(this.replayButton);

            this.wooshSound = game.add.audio(params.wooshSoundKey);

            this.fixedToCamera = true;
        }

        public show(score: number): void {
            this.gameOverStatus = true;
            this.scoreWindow.score = score;

            this.gameOver.y = Global.Constants.gameHeight / 2 - 80;
            let gameOverTween = this.game.add.tween(this.gameOver).to({ alpha: 1, y: Global.Constants.gameHeight / 2 - 100 }, 500, Phaser.Easing.Exponential.Out, true, 500);
            gameOverTween.onStart.add(() => {
                this.wooshSound.play();
            });

            this.scoreWindow.y = Global.Constants.gameHeight / 2 + 20;
            let scoreBoardTween = this.game.add.tween(this.scoreWindow).to({ alpha: 1, y: Global.Constants.gameHeight / 2 }, 500, Phaser.Easing.Exponential.Out, true, 1500);
            scoreBoardTween.onStart.add(() => {
                this.wooshSound.play();
            });
{'fraction_non_alphanumeric': 0.10262295081967213, 'fraction_numerical': 0.015901639344262294, 'mean_word_length': 1.998034398034398, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, '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': '338499', 'n_tokens_mistral': 1812, 'n_tokens_neox': 1681, 'n_words': 319}