<commit_before>Spore = function(x,y,size){
	this.x = x || floor(random(mapSize/cellSize))*cellSize+cellSize/2
	this.y = y || floor(random(mapSize/cellSize))*cellSize+cellSize/2
	this.speed = cellSpeed
	this.vel = {x:random(-1,1),y:random(-1,1)}
	this.food = 100; //saturation
	this.size = size || sporeSize
	this.life = 100;
	this.tileArea = 0;
	this.facing = PI/2+Math.atan2(this.vel.y, this.vel.x);
	this.tFacing = PI/2+Math.atan2(this.vel.y, this.vel.x);
	this.alive = true;
	this.target = {x:this.x,y:this.y}
	this.bleedAmm = 0;
	this.bleeding = false;
	this.tileIndx = 0;
}
Spore.prototype.draw = function(){
  push()
  translate(this.x,this.y)
  rotate(this.facing)
	fill(255,55+this.life*2,55+this.life*2,155+this.food)
	ellipse(0,0,this.size*0.9,this.size)
	fill(0,0,255,155+this.food)
	ellipse(0,-this.size/5,this.size/2,this.size/3)
	pop()
}
Spore.prototype.bleed = function(){
  if(this.life <= 0)
    return
  if(this.bleedAmm > 0){
    this.life -= ceil(this.bleedAmm);
    this.bleedAmm-= 0.2
	if(random() < 0.3 && tiles[this.tileIndx].land){
      bloodT.push(new Blood(this.x,this.y,this.size))
	  //console.log(tiles[this.tileIndx].land,this.tileIndx)
	}
  }
  if(this.bleedAmm <= 0){
    this.bleedAmm = 0;
    this.bleeding = false;
  }else
    setTimeout(this.bleed.bind(this),1000-floor(this.bleedAmm*20))
}
Spore.prototype.checkMove = function(){<commit_msg>spores spawn only on land<commit_after>Spore = function(x,y,size){
  var coords = this.spawnCords()
  this.x = x ||coords[0]
	this.y = y ||coords[1]
	this.speed = cellSpeed
	this.vel = {x:random(-1,1),y:random(-1,1)}
	this.food = 100; //saturation
	this.size = size || sporeSize
	this.life = 100;
	this.tileArea = 0;
	this.facing = PI/2+Math.atan2(this.vel.y, this.vel.x);
	this.tFacing = PI/2+Math.atan2(this.vel.y, this.vel.x);
	this.alive = true;
	this.target = {x:this.x,y:this.y}
	this.bleedAmm = 0;
	this.bleeding = false;
	this.tileIndx = 0;
}
Spore.prototype.spawnCords = function(){
  do{
  var x = random(mapSize)
  var y = random(mapSize)
  var indx = floor(y/cellSize)*(mapSize/cellSize)+floor(x/cellSize)
  } while(!tiles[indx].land)
  return [x,y]
}
Spore.prototype.draw = function(){
  push()
  translate(this.x,this.y)
  rotate(this.facing)
	fill(255,55+this.life*2,55+this.life*2,155+this.food)
	ellipse(0,0,this.size*0.9,this.size)
	fill(0,0,255,155+this.food)
	ellipse(0,-this.size/5,this.size/2,this.size/3)
	pop()
}
Spore.prototype.bleed = function(){
  if(this.life <= 0)
    return
  if(this.bleedAmm > 0){
    this.life -= ceil(this.bleedAmm);
    this.bleedAmm-= 0.2
	if(random() < 0.3 && tiles[this.tileIndx].land){
      bloodT.push(new Blood(this.x,this.y,this.size))
	  //console.log(tiles[this.tileIndx].land,this.tileIndx)
	}
  }
  if(this.bleedAmm <= 0){
    this.bleedAmm = 0;
    this.bleeding = false;
  }else
    setTimeout(this.bleed.bind(this),1000-floor(this.bleedAmm*20))
}
Spore.prototype.checkMove = function(){
{'fraction_non_alphanumeric': 0.1922945789294238, 'fraction_numerical': 0.04159563586771224, 'mean_word_length': 4.041237113402062, 'pattern_counts': {'":': 0, '<': 9, '<?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': '3030353', 'n_tokens_mistral': 1354, 'n_tokens_neox': 1284, 'n_words': 171}