<commit_before>function bot(){
	var self = this;
	self.getMoves = function(game) {
		var state = game.State;
		var player = game.Player
		var energy;
		var spawn;
		var enemyenergy;
		var enemySpawn;
		var playerIndices;
		var enemyIndices;
		var moves = [];

		if(player === 'p1') {
			energy = state.p1.energy;
			spawn = state.p1.spawn;
			enemyenergy = state.p2.energy;
			enemySpawn = state.p2.spawn;
			playerIndices = getAllIndices(state.grid, '1');
			enemyIndices = getAllIndices(state.grid, '2');
		}
		else {
			energy = state.p2.energy;
			spawn = state.p2.spawn;
			enemyenergy = state.p1.energy;
			enemySpawn = state.p1.spawn;
			playerIndices = getAllIndices(state.grid, '2');
			enemyIndices = getAllIndices(state.grid, '1');
		}

		playerIndices.forEach(function(playerIndex) {
			var adjacent = getAdjacentIndices(state, playerIndex);<commit_msg>bot can have player initialized to player<commit_after>function bot(player){
	var self = this;
	var player = player;
	self.getMoves = function(game) {
		if(player == null){
			player = game.Player;
		}
		var state = game.State || game;
		var energy;
		var spawn;
		var enemyenergy;
		var enemySpawn;
		var playerIndices;
		var enemyIndices;
		var moves = [];

		if(player === 'p1') {
			energy = state.p1.energy;
			spawn = state.p1.spawn;
			enemyenergy = state.p2.energy;
			enemySpawn = state.p2.spawn;
			playerIndices = getAllIndices(state.grid, '1');
			enemyIndices = getAllIndices(state.grid, '2');
		}
		else {
			energy = state.p2.energy;
			spawn = state.p2.spawn;
			enemyenergy = state.p1.energy;
			enemySpawn = state.p1.spawn;
			playerIndices = getAllIndices(state.grid, '2');
			enemyIndices = getAllIndices(state.grid, '1');
		}

		playerIndices.forEach(function(playerIndex) {
			var adjacent = getAdjacentIndices(state, playerIndex);
{'fraction_non_alphanumeric': 0.13036303630363036, 'fraction_numerical': 0.014301430143014302, 'mean_word_length': 3.6881443298969074, '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': '7066164', 'n_tokens_mistral': 734, 'n_tokens_neox': 676, 'n_words': 136}