<commit_before>var canvas = document.getElementById('can');
var ctx = canvas.getContext('2d');
var pressed = {};
var asteroids = [];
var touched = false;

//Should be global attributes
var delta_t = 0.05;



//Some thought should be given to these. They are bad. They make me feel bad.
var id = -1; //Used as a unique id for each asteroid
//var deletions = 0; //Used to modify the unique id when deleting an element


//This function should be changed!
var deleteElem = function(obj, array) {
    array.splice(array.indexOf(obj),1);
}
//It's a bad function!


//Commonly used functions:

//Return a real min to max (inclusive)
var getUnif = function(min, max) {
    return Math.random() * (max - min) + min;
}


//Return an integer min to max (inclusive)
var getRandInt = function(min,max) {
    return Math.round(getUnif(min,max));
}


//Emulate a normal distribution - this uses the central limit theorem (the more iterations, the closer to a true normal it will be)
var getNorm = function(mean, iterations) {
    var output = 0;
    for (var i = 0; i < iterations; i++) {
        output += Math.random() * mean;
    }
    return output / iterations;
}

//Runs every frame to adjust to resizing windows
var body_height;
var body_width;
var getSetStageSize = function (vert_percent, horz_percent) {
    body_height = window.innerHeight || document.documentElement.clientHeight || document.getElementsByTagName('body')[0].clientHeight;
    body_width = window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth;

    canvas.width = horz_percent * body_width;
    canvas.height = vert_percent * body_height;
}


//Asteroid object definition:
function asteroid(x, y, r, max_veloc, alpha, id, color) {
    this.x = x;
    this.y = y;<commit_msg>Small additions for testing inheritence-based visible objects. Preparing to change name of repository.<commit_after>var canvas = document.getElementById('can');
var ctx = canvas.getContext('2d');
var pressed = {};
var asteroids = [];
var touched = false;

//Should be global attributes
var delta_t = 0.05;



//Some thought should be given to these. They are bad. They make me feel bad.
var id = -1; //Used as a unique id for each asteroid
//var deletions = 0; //Used to modify the unique id when deleting an element


//This function should be changed!
var deleteElem = function(obj, array) {
    array.splice(array.indexOf(obj),1);
}
//It's a bad function!


//Commonly used functions:

//Return a real min to max (inclusive)
var getUnif = function(min, max) {
    return Math.random() * (max - min) + min;
}


//Return an integer min to max (inclusive)
var getRandInt = function(min,max) {
    return Math.round(getUnif(min,max));
}


//Emulate a normal distribution - this uses the central limit theorem (the more iterations, the closer to a true normal it will be)
var getNorm = function(mean, iterations) {
    var output = 0;
    for (var i = 0; i < iterations; i++) {
        output += Math.random() * mean;
    }
    return output / iterations;
}

//Runs every frame to adjust to resizing windows
var body_height;
var body_width;
var getSetStageSize = function (vert_percent, horz_percent) {
    body_height = window.innerHeight || document.documentElement.clientHeight || document.getElementsByTagName('body')[0].clientHeight;
    body_width = window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth;

    canvas.width = horz_percent * body_width;
    canvas.height = vert_percent * body_height;
}


//Polygon parent class for every visible object in the game (asteroids, shots and player)
//This class should handle all collision detection and drawing functions
function polygon (x,y,x_adds,y_adds) {
    
    //Position information
    this.x = x;
    this.y = y;
    this.x_adds = x_adds;
    this.y_adds = y_adds;

}

polygon.prototype.draw = function () {

    ctx.strokeStyle = "#ffffff";
    ctx.lineWidth = 1;
    ctx.beginPath();
    ctx.moveTo(this.x + this.x_adds[0], this.y + this.y_adds[0]);
    for(var i=0; i<this.num_verts; i++){
    	ctx.lineTo(this.x + this.x_adds[i+1], this.y + this.y_adds[i+1]);
    }
    ctx.stroke();
    
}



//Asteroid object definition:
function asteroid(x, y, r, max_veloc, alpha, id, color) {
    this.x = x;
    this.y = y;
{'fraction_non_alphanumeric': 0.11992619926199262, 'fraction_numerical': 0.006457564575645757, 'mean_word_length': 3.65343347639485, 'pattern_counts': {'":': 0, '<': 6, '<?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': '3263476', 'n_tokens_mistral': 1396, 'n_tokens_neox': 1342, 'n_words': 452}