Code viewer for Mind: Cloned CA318 Clone

// Cloned by Ronan Williams on 12 Nov 2018 from Mind "CA318 Clone" by Ronan Williams 
// Please leave this clone trail here.
 


// Cloned by Ronan Williams on 5 Nov 2018 from Mind "New Mind" by Ronan Williams 
// Please leave this clone trail here.
 
 
function Mind() 
{ 
    
    
    this.nextStep = function(){
        theobject.position.y = theobject.position.y + AB.randomIntAtoB ( -30, 30 );
	};
	
    this.newRun = function()                  
    {
        
        
	}
    
	this.getAction = function ( x )		 
{ 



    var ai = x[0];
    var aj = x[1];
    var ei = x[2];
    var ej = x[3];
    
    
if ( AB.randomBoolean())
{
     if ( ej < aj ) 	return (   ACTION_UP ); 
	 if ( ej > aj ) 	return (   ACTION_DOWN );


}
else
{
	 if ( ei < ai ) 	return (   ACTION_RIGHT ); 
	 if ( ei > ai ) 	return (   ACTION_LEFT );

}

    return (AB.randomIntAtoB (0,3));
};

		 
	this.endRun = function()                 
	{
	};
	
	

}