<commit_before>//Fucntion for drawing 
function draw()
{   
	
	bullets.forEach(function(value){
		circlefill(canvas, value.x, value.y, 2, makecol(255,0,0));
	});
	
	circlefill(canvas, hero.x+hero.width/2, hero.y+hero.height/2, hero.width/2, makecol(0,0,0));
	
	var d = distance(hero.x +hero.width/2, hero.y + hero.height/2, mouse_x, mouse_y);
	circlefill(canvas, hero.x +hero.width/2 + 15*((mouse_x-hero.x-hero.width/2)/d), hero.y + hero.height/2 + 15*((mouse_y-hero.y- hero.height/2)/d), 4, makecol(0,0,0));
	
	
	activePlatforms.forEach(function(value){
		
		rectfill(canvas, value.x - translatedX, value.y, value.width, value.height, makecol(0,0,0));
		
		if(value.drawShades){
				var x = sgn(value.x - translatedX+value.width-hero.x), x1 = sgn(value.x - translatedX-hero.x);
				polygonfill(canvas, 4, [value.x - translatedX, value.y, value.x - translatedX+value.width, value.y+value.height, x*10000, ((value.y+value.height - hero.y)*(x*10000-hero.x))/(value.x - translatedX+value.width-hero.x) + hero.y, x1*10000, ((value.y - hero.y)*(x1*10000-hero.x))/(value.x - translatedX-hero.x) + hero.y ], makecol(0,0,0));
				polygonfill(canvas, 4, [value.x - translatedX, value.y+value.height, value.x - translatedX+value.width, value.y, x*10000, ((value.y - hero.y)*(x*10000-hero.x))/(value.x - translatedX+value.width-hero.x) + hero.y, x1*10000, ((value.y+value.height - hero.y)*(x1*10000-hero.x))/(value.x - translatedX-hero.x) + hero.y ], makecol(0,0,0));
		}
		
	});
}<commit_msg>comments in draw.js file added<commit_after>//Fucntion for drawing elements on canvas
function draw()
{   
	
	//draw all bullets
	bullets.forEach(function(value){
		circlefill(canvas, value.x, value.y, 2, makecol(255,0,0));
	});
	
	//draw hero
	circlefill(canvas, hero.x+hero.width/2, hero.y+hero.height/2, hero.width/2, makecol(0,0,0));
	
	//draw heros hand
	var d = distance(hero.x +hero.width/2, hero.y + hero.height/2, mouse_x, mouse_y);
	circlefill(canvas, hero.x +hero.width/2 + 15*((mouse_x-hero.x-hero.width/2)/d), hero.y + hero.height/2 + 15*((mouse_y-hero.y- hero.height/2)/d), 4, makecol(0,0,0));
	
	//draw all platforms
	activePlatforms.forEach(function(value){
		
		//draw platform body
		rectfill(canvas, value.x - translatedX, value.y, value.width, value.height, makecol(0,0,0));
		
		//draw platform shades, relatively to hero positiond
		if(value.drawShades){
				var x = sgn(value.x - translatedX+value.width-hero.x), x1 = sgn(value.x - translatedX-hero.x);
				polygonfill(canvas, 4, [value.x - translatedX, value.y, value.x - translatedX+value.width, value.y+value.height, x*10000, ((value.y+value.height - hero.y)*(x*10000-hero.x))/(value.x - translatedX+value.width-hero.x) + hero.y, x1*10000, ((value.y - hero.y)*(x1*10000-hero.x))/(value.x - translatedX-hero.x) + hero.y ], makecol(0,0,0));
				polygonfill(canvas, 4, [value.x - translatedX, value.y+value.height, value.x - translatedX+value.width, value.y, x*10000, ((value.y - hero.y)*(x*10000-hero.x))/(value.x - translatedX+value.width-hero.x) + hero.y, x1*10000, ((value.y+value.height - hero.y)*(x1*10000-hero.x))/(value.x - translatedX-hero.x) + hero.y ], makecol(0,0,0));
		}
		
	});
}
{'fraction_non_alphanumeric': 0.20450936805335027, 'fraction_numerical': 0.05208002540489044, 'mean_word_length': 4.072463768115942, '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': '4069457', 'n_tokens_mistral': 1395, 'n_tokens_neox': 1226, 'n_words': 204}