<commit_before>"use strict";

function typedWave(wave, player, oldEnemy) {

	var simple = function(){
		var e = createEnemy(randomLocationAvoidRadius(-3 + 0.24, 3 - 0.24, -3 + 0.24, 3 - 0.24, player.body.GetPosition(), 1), 0.12, {
			linearVelocity: rtToVector(0.15, randomAngle()),
			color: {h: 0, s: 1, l: 0.5, a: 1}
		}, [alignRotationToMovement]);

		return e;
	};

	var chasing = function(){
		var e = createEnemy(randomLocationAvoidRadius(-3 + 0.24, 3 - 0.24, -3 + 0.24, 3 - 0.24, player.body.GetPosition(), 1), 0.12, {
			linearVelocity: rtToVector(0.15, randomAngle()),
			color: {h: 20, s: 1, l: 0.5, a: 1}
		}, [alignRotationToMovement, chasePlayer]);

		e.chaseFactor = 0.02;
		return e;
	};
	
	var randomFiring = function(){
		var e = createEnemy(randomLocationAvoidRadius(-3 + 0.24, 3 - 0.24, -3 + 0.24, 3 - 0.24, player.body.GetPosition(), 1), 0.12, {
			linearVelocity: rtToVector(0.15, randomAngle()),
			color: {h: 10, s: 1, l: 0.5, a: 1}
		}, [alignRotationToMovement, randomFire]);

		e.fireCooldown = 100;
		e.bulletOptions = {};
		e.bulletSize = 0.06;
		e.bulletSpeed = 0.05;
		e.bulletLifetime = 60;
		e.bulletBehaviours = [alignRotationToMovement];
		return e;
	};
	
	var aimedFiring = function(){
		var e = createEnemy(randomLocationAvoidRadius(-3 + 0.24, 3 - 0.24, -3 + 0.24, 3 - 0.24, player.body.GetPosition(), 1), 0.12, {
			linearVelocity: rtToVector(0.15, randomAngle()),
			color: {h: 350, s: 1, l: 0.5, a: 1}
		}, [alignRotationToMovement, aimedFire]);

		e.fireCooldown = 100;
		e.bulletOptions = {};
		e.bulletSize = 0.06;
		e.bulletSpeed = 0.05;
		e.bulletLifetime = 60;
		e.aimError = deg2rad(10);
		e.bulletBehaviours = [alignRotationToMovement];
		return e;
	};
	
	var hp5 = function(){
		var e = createEnemy(randomLocationAvoidRadius(-3 + 0.24, 3 - 0.24, -3 + 0.24, 3 - 0.24, player.body.GetPosition(), 1), 0.12, {
			linearVelocity: rtToVector(0.15, randomAngle()),
			color: {h: 0, s: 1, l: 0.55, a: 1}
		}, [alignRotationToMovement], [hp]);
		
		e.hp = 5;
		
		return e;
	};

	var waveData = [];
	waveData[1] = [simple, simple, simple];
	waveData[2] = [simple, chasing, simple, chasing];
	waveData[3] = [randomFiring, randomFiring, randomFiring];
	waveData[4] = [simple, simple, chasing, chasing, randomFiring, randomFiring];
	waveData[5] = [aimedFiring, aimedFiring, aimedFiring];
	waveData[6] = [chasing, chasing, randomFiring, randomFiring, aimedFiring, aimedFiring];
	waveData[7] = [hp5, hp5, hp5, chasing, chasing, chasing, chasing];
	
	var enemy = [];
	$.each(waveData[wave], function(){
		enemy.push(this());
	});

	return enemy;
}<commit_msg>interporlate further waves, new wave 8<commit_after>"use strict";

function typedWave(wave, player, oldEnemy) {

	var simple = function(){
		var e = createEnemy(randomLocationAvoidRadius(-3 + 0.24, 3 - 0.24, -3 + 0.24, 3 - 0.24, player.body.GetPosition(), 1), 0.12, {
			linearVelocity: rtToVector(0.15, randomAngle()),
			color: {h: 0, s: 1, l: 0.5, a: 1}
		}, [alignRotationToMovement]);

		return e;
	};

	var chasing = function(){
		var e = createEnemy(randomLocationAvoidRadius(-3 + 0.24, 3 - 0.24, -3 + 0.24, 3 - 0.24, player.body.GetPosition(), 1), 0.12, {
			linearVelocity: rtToVector(0.15, randomAngle()),
			color: {h: 20, s: 1, l: 0.5, a: 1}
		}, [alignRotationToMovement, chasePlayer]);

		e.chaseFactor = 0.02;
		return e;
	};
	
	var randomFiring = function(){
		var e = createEnemy(randomLocationAvoidRadius(-3 + 0.24, 3 - 0.24, -3 + 0.24, 3 - 0.24, player.body.GetPosition(), 1), 0.12, {
			linearVelocity: rtToVector(0.15, randomAngle()),
			color: {h: 10, s: 1, l: 0.5, a: 1}
		}, [alignRotationToMovement, randomFire]);

		e.fireCooldown = 100;
		e.bulletOptions = {};
		e.bulletSize = 0.06;
		e.bulletSpeed = 0.05;
		e.bulletLifetime = 60;
		e.bulletBehaviours = [alignRotationToMovement];
		return e;
	};
	
	var aimedFiring = function(){
		var e = createEnemy(randomLocationAvoidRadius(-3 + 0.24, 3 - 0.24, -3 + 0.24, 3 - 0.24, player.body.GetPosition(), 1), 0.12, {
			linearVelocity: rtToVector(0.15, randomAngle()),
			color: {h: 350, s: 1, l: 0.5, a: 1}
		}, [alignRotationToMovement, aimedFire]);

		e.fireCooldown = 100;
		e.bulletOptions = {};
		e.bulletSize = 0.06;
		e.bulletSpeed = 0.05;
		e.bulletLifetime = 60;
		e.aimError = deg2rad(10);
		e.bulletBehaviours = [alignRotationToMovement];
		return e;
	};
	
	var hp5 = function(){
		var e = createEnemy(randomLocationAvoidRadius(-3 + 0.24, 3 - 0.24, -3 + 0.24, 3 - 0.24, player.body.GetPosition(), 1), 0.12, {
			linearVelocity: rtToVector(0.15, randomAngle()),
			color: {h: 0, s: 1, l: 0.55, a: 1}
		}, [alignRotationToMovement], [hp]);
		
		e.hp = 5;
		
		return e;
	};

	var waveData = [];
	waveData[1] = [simple, simple, simple];
	waveData[2] = [simple, chasing, simple, chasing];
	waveData[3] = [randomFiring, randomFiring, randomFiring];
	waveData[4] = [simple, simple, chasing, chasing, randomFiring, randomFiring];
	waveData[5] = [aimedFiring, aimedFiring, aimedFiring];
	waveData[6] = [chasing, chasing, randomFiring, randomFiring, aimedFiring, aimedFiring];
	waveData[7] = [hp5, hp5, hp5, chasing, chasing, chasing, chasing];
	waveData[8] = [hp5, hp5, hp5, aimedFiring, randomFiring, aimedFiring, randomFiring];
	
	var enemy = [];
	$.each(waveData[wave % waveData.length], function(){
		for (var i = 0; i < (wave / waveData.length) | 0; i++) { // float to int
			enemy.push(this());
		}
	});

	return enemy;
}
{'fraction_non_alphanumeric': 0.17905468025949953, 'fraction_numerical': 0.06987951807228916, 'mean_word_length': 3.78793256433008, 'pattern_counts': {'":': 0, '<': 4, '<?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': '57972', 'n_tokens_mistral': 2508, 'n_tokens_neox': 2100, 'n_words': 508}