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

    function KillScreen(stage, sceneStorage) {
        this.stage = stage;
        this.sceneStorage = sceneStorage;
    }

    KillScreen.prototype.show = function (nextScene) {
        var speedStripes = this.sceneStorage.speedStripes;
        delete this.sceneStorage.speedStripes;
        var shipDrawable = this.sceneStorage.ship;
        delete this.sceneStorage.ship;
        var fireDrawable = this.sceneStorage.fire;
        delete this.sceneStorage.fire;
        var countDrawables = this.sceneStorage.counts;
        delete this.sceneStorage.counts;


        var self = this;

        speedStripes.forEach(function (speedStripe) {
            self.stage.remove(speedStripe);
        });

        var dockShipToMiddlePosition = self.stage.getPath(shipDrawable.x, shipDrawable.y,
            shipDrawable.x, 480 / 2, 120, Transition.EASE_OUT_EXPO);

        var explosionSprite = self.stage.getSprite('explosion-anim/explosion', 25, false);

        self.stage.move(shipDrawable, dockShipToMiddlePosition, function () {
            self.stage.animate(shipDrawable, explosionSprite, function () {
                self.stage.remove(shipDrawable);
                self.stage.remove(fireDrawable);

                countDrawables.forEach(function (count) {
                    self.stage.remove(count);
                });

                nextScene()
            });
        });
        self.stage.move(fireDrawable, dockShipToMiddlePosition);
    };

    return KillScreen;
})(Transition);<commit_msg>changed old kill screen scene rendering to use responsive constants instead of fix values<commit_after>var KillScreen = (function (Transition, calcScreenConst) {
    "use strict";

    function KillScreen(stage, sceneStorage) {
        this.stage = stage;
        this.sceneStorage = sceneStorage;
    }

    KillScreen.prototype.show = function (nextScene, screenWidth, screenHeight) {
        var speedStripes = this.sceneStorage.speedStripes;
        delete this.sceneStorage.speedStripes;
        var shipDrawable = this.sceneStorage.ship;
        delete this.sceneStorage.ship;
        var fireDrawable = this.sceneStorage.fire;
        delete this.sceneStorage.fire;
        var countDrawables = this.sceneStorage.counts;
        delete this.sceneStorage.counts;

        var self = this;

        speedStripes.forEach(function (speedStripe) {
            self.stage.remove(speedStripe);
        });

        var heightHalf = calcScreenConst(screenHeight, 2);
        var dockShipToMiddlePosition = self.stage.getPath(shipDrawable.x, shipDrawable.y,
            shipDrawable.x, heightHalf, 120, Transition.EASE_OUT_EXPO);

        var explosionSprite = self.stage.getSprite('explosion-anim/explosion', 25, false);

        self.stage.move(shipDrawable, dockShipToMiddlePosition, function () {
            self.stage.animate(shipDrawable, explosionSprite, function () {
                self.stage.remove(shipDrawable);
                self.stage.remove(fireDrawable);

                countDrawables.forEach(function (count) {
                    self.stage.remove(count);
                });

                nextScene()
            });
        });
        self.stage.move(fireDrawable, dockShipToMiddlePosition);
    };

    return KillScreen;
})(Transition, calcScreenConst);
{'fraction_non_alphanumeric': 0.09738717339667459, 'fraction_numerical': 0.004453681710213777, 'mean_word_length': 2.462487153134635, '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': '7457120', 'n_tokens_mistral': 939, 'n_tokens_neox': 903, 'n_words': 165}