Code viewer for Mind: Cloned New Mind
// Cloned by Odhran Byrne-Gildea on 7 Nov 2018 from Mind "New Mind" by Odhran Byrne-Gildea 
// Please leave this clone trail here.
function Mind() 
{ 
this.getAction = function ( x )
	{ 
		var agent_x = x[0];
		var agent_y = x[1];
		var enemy_x = x[2];
		var enemy_y = x[3];
		if (enemy_x < agent_x)
            return (AB.randomPick(ACTION_RIGHT,	AB.randomPick3(ACTION_LEFT, ACTION_UP, ACTION_DOWN))); 
		if (enemy_x > agent_x) 	
		    return (AB.randomPick(ACTION_LEFT, AB.randomPick3(ACTION_RIGHT, ACTION_UP, ACTION_DOWN))); 
		if (enemy_y < agent_y) 	
		    return (AB.randomPick(ACTION_UP, AB.randomPick3(ACTION_DOWN, ACTION_RIGHT, ACTION_LEFT))); 
		if (enemy_y > agent_y) 	
		    return (AB.randomPick(ACTION_DOWN, AB.randomPick3(ACTION_UP, ACTION_RIGHT, ACTION_LEFT))); 
 		return  (AB.randomIntAtoB(0,3));
	};
}