<commit_before>function Death(descr) {

    // Common inherited setup logic from Entity
    this.setup(descr);

    this.rememberResets();
    deathexplo.play();
	deathexplo.volume = 0.1;
    // Default sprite, if not otherwise specified
  
    this._scale = 1;
	entityManager._Landscape[0].deletePixAt(Math.floor(this.cx),Math.floor(this.cy),this.radius);

};

Death.prototype = new Entity();

Death.prototype.cx = 200;
Death.prototype.cy = 300;
Death.prototype.timeFrame = 0;
Death.prototype.height = 64;
Death.prototype.width = 64;
Death.prototype.maxDamage = 70;
Death.prototype.power =70;
Death.prototype.radius = 60;
Death.prototype.explosion = true;


Death.prototype.rememberResets = function () {
    // Remember my reset positions
    this.reset_cx = this.cx;
    this.reset_cy = this.cy;
    this.reset_rotation = this.rotation;
};



Death.prototype.update = function (du) {
	//console.log(this.timeFrame);

	
	this.timeFrame++;
	
	if(this.timeFrame === 25){
		this._isDeadNow = true;
		
	}
	
	spatialManager.unregister(this);
	if(this._isDeadNow){
		return entityManager.KILL_ME_NOW;
	}
	//thvi sprengjan theytir i threfalt staerra svaedi en that eydir pixlum
	var possibleWorms = this.findWorms(this.radius*3);
	if(possibleWorms&& this.timeFrame===1){
		for(var i =0;i<possibleWorms.length;i++)
		{
			var worm =possibleWorms[i].worm;
			if(this.explosion === true) //check if it's a bomber
			worm.blastAway(this.cx,this.cy,this.power,this.radius*3);
		}
	}

	spatialManager.register(this);
};


Death.prototype.getRadius = function () {
    return (g_explosion[this.timeFrame].width / 2) * 0.9;
};

Death.prototype.render = function (ctx) {


	var cel = g_explosion[this.timeFrame];
	if(this.explosion === true)
	cel.drawSheetAt(ctx,this.cx-(this.width/2), this.cy-(this.height/2) - this.timeFrame*1.5);	
		
};

function Rip(descr) {

    // Common inherited setup logic from Entity
    this.setup(descr);

    this.rememberResets();<commit_msg>meira<commit_after>function Death(descr) {

    // Common inherited setup logic from Entity
    this.setup(descr);

    this.rememberResets();
    deathexplo.play();
	deathexplo.volume = 0.1;
    // Default sprite, if not otherwise specified
  
    this._scale = 1;
	entityManager._Landscape[0].deletePixAt(Math.floor(this.cx),Math.floor(this.cy),this.radius);

};

Death.prototype = new Entity();

Death.prototype.cx = 200;
Death.prototype.cy = 300;
Death.prototype.timeFrame = 0;
Death.prototype.height = 64;
Death.prototype.width = 64;
Death.prototype.maxDamage = 70;
Death.prototype.power =70;
Death.prototype.radius = 60;
Death.prototype.explosion = true;


Death.prototype.rememberResets = function () {
    // Remember my reset positions
    this.reset_cx = this.cx;
    this.reset_cy = this.cy;
    this.reset_rotation = this.rotation;
};



Death.prototype.update = function (du) {
	//console.log(this.timeFrame);

	
	this.timeFrame++;
	
	if(this.timeFrame === 25){
		this._isDeadNow = true;
		
	}
	
	spatialManager.unregister(this);
	if(this._isDeadNow){
		return entityManager.KILL_ME_NOW;
	}
	//thvi sprengjan theytir i threfalt staerra svaedi en that eydir pixlum
	var possibleWorms = this.findWorms(this.radius*3);
	if(possibleWorms&& this.timeFrame===1){
		for(var i =0;i<possibleWorms.length;i++)
		{
			var worm =possibleWorms[i].worm;
			if(this.explosion === true) //check if it's a bomber
			worm.blastAway(this.cx,this.cy,this.power,this.radius*2);
		}
	}

	spatialManager.register(this);
};


Death.prototype.getRadius = function () {
    return (g_explosion[this.timeFrame].width / 2) * 0.9;
};

Death.prototype.render = function (ctx) {


	var cel = g_explosion[this.timeFrame];
	if(this.explosion === true)
	cel.drawSheetAt(ctx,this.cx-(this.width/2), this.cy-(this.height/2) - this.timeFrame*1.5);	
		
};

function Rip(descr) {

    // Common inherited setup logic from Entity
    this.setup(descr);

    this.rememberResets();
{'fraction_non_alphanumeric': 0.14614205416453754, 'fraction_numerical': 0.017373530914665303, 'mean_word_length': 3.8633540372670807, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2434466', 'n_tokens_mistral': 1550, 'n_tokens_neox': 1369, 'n_words': 251}