<commit_before>function Game(display) {
    this.display = display;
    this.count = 0;
    this.framerate = 30;
    this.id = null;
}

Game.prototype.step = function() {
    this.count++;
    this.display.set(Point.random(), ~~(Math.random() * Display.DEPTH));
};

Game.prototype.runner = function() {
    var _this = this;
    return function() {
        _this.step();
    };
};

Game.prototype.run = function() {
    if (this.id == null) {
        this.id = setInterval(this.runner(), 1000 / this.framerate);
    }
};

Game.prototype.stop = function() {
    if (this.id != null) {
        clearInterval(this.id);
        this.id = null;
    }
};

Game.prototype.left = function() {
    console.log('input: left');
};
Game.prototype.up = function() {
    console.log('input: up');
};
Game.prototype.right = function() {
    console.log('input: right');
};
Game.prototype.down = function() {
    console.log('input: down');
};<commit_msg>Indicate if state changed on game run and stop.<commit_after>function Game(display) {
    this.display = display;
    this.count = 0;
    this.framerate = 30;
    this.id = null;
}

Game.prototype.step = function() {
    this.count++;
    this.display.set(Point.random(), ~~(Math.random() * Display.DEPTH));
};

Game.prototype.runner = function() {
    var _this = this;
    return function() {
        _this.step();
    };
};

Game.prototype.run = function() {
    if (this.id == null) {
        this.id = setInterval(this.runner(), 1000 / this.framerate);
        return true;
    } else {
        return false;
    }
};

Game.prototype.stop = function() {
    if (this.id != null) {
        clearInterval(this.id);
        this.id = null;
        return true;
    } else {
        return false;
    }
};

Game.prototype.left = function() {
    console.log('input: left');
};
Game.prototype.up = function() {
    console.log('input: up');
};
Game.prototype.right = function() {
    console.log('input: right');
};
Game.prototype.down = function() {
    console.log('input: down');
};
{'fraction_non_alphanumeric': 0.1783596837944664, 'fraction_numerical': 0.00691699604743083, 'mean_word_length': 2.6818181818181817, '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': '6084067', 'n_tokens_mistral': 678, 'n_tokens_neox': 663, 'n_words': 132}