<commit_before>function Camera(canvas, x, y, scale) {
    this.ctx = canvas.getContext('2d');
    this.width = canvas.width;
    this.height = canvas.height;
    this.scale = scale;
    this.x = x;
    this.y = y;

    this.hud = new Bitmap('assets/hud.png', 160, 16, 1);
    this.numbers = new Bitmap('assets/font.png', 4, 6, 10);

    // Don't smooth images when scaling up
    this.ctx.imageSmoothingEnabled = false;
}

Camera.prototype.render = function(entities) {
    this.reposition();

    // Clear the frame
    this.ctx.clearRect(0, 0, this.width, this.height);

    this.ctx.translate(canvas.width / 2, canvas.height / 2);

    // Draw all entities
    var that = this;
    entities.forEach(function(entity) {
        that.draw(entity.bitmap, entity.x, entity.y, entity.rotation, entity.fixed);
    });

    this.ctx.translate(-canvas.width / 2, -canvas.height / 2);<commit_msg>Simplifying code a bit<commit_after>function Camera(canvas, x, y, scale) {
    this.ctx = canvas.getContext('2d');
    this.scale = scale;
    this.x = x;
    this.y = y;

    this.hud = new Bitmap('assets/hud.png', 160, 16, 1);
    this.numbers = new Bitmap('assets/font.png', 4, 6, 10);

    // Don't smooth images when scaling up
    this.ctx.imageSmoothingEnabled = false;
}

Camera.prototype.render = function(entities) {
    this.reposition();

    // Clear the frame
    this.ctx.clearRect(0, 0, canvas.width, canvas.height);

    this.ctx.translate(canvas.width / 2, canvas.height / 2);

    // Draw all entities
    var that = this;
    entities.forEach(function(entity) {
        that.draw(entity.bitmap, entity.x, entity.y, entity.rotation, entity.fixed);
    });

    this.ctx.translate(-canvas.width / 2, -canvas.height / 2);
{'fraction_non_alphanumeric': 0.15170816444701796, 'fraction_numerical': 0.019687319050376375, 'mean_word_length': 2.857142857142857, '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': '3894399', 'n_tokens_mistral': 612, 'n_tokens_neox': 569, 'n_words': 132}