<commit_before>export class Game {
    frame(currentTime) {
        this.requestID = window.requestAnimationFrame(this.frame);

        if (!this.prevTime) {
            this.prevTime = currentTime;
        }
        let delta = currentTime - this.prevTime;

        this.update(delta);
        this.draw(delta);

        this.prevTime = currentTime;
    }

    start() {
        this.init();
        window.requestAnimationFrame(this.frame);
    }
<commit_msg>Fix Game.js<commit_after>export class Game {
    constructor(stageElement) {
        if (!stageElement) {
            throw Error("No stage element specified!");
        }
        this.stageElement = stageElement;
    }

    frame(currentTime) {
        this.requestID = window.requestAnimationFrame(currentTime => this.frame(currentTime));

        if (!this.prevTime) {
            this.prevTime = currentTime;
        }
        let delta = currentTime - this.prevTime;

        this.update(delta);
        this.draw(delta);

        this.prevTime = currentTime;
    }

    start() {
        this.init();
        window.requestAnimationFrame(currentTime => this.frame(currentTime));
    }

{'fraction_non_alphanumeric': 0.11371527777777778, 'fraction_numerical': 0.0, 'mean_word_length': 2.1331521739130435, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3898270', 'n_tokens_mistral': 325, 'n_tokens_neox': 315, 'n_words': 55}