Code viewer for Mind: New Mind
function Mind()
{
    this.getAction=function(a)
    {
        if(console.log(a),a.stuckfor>1)
            return AB.randomIntAtoB(0,3);
        if(AB.randomBoolean())
        {
            if(a[0]>=a[2])
                return 1;
            if(a[1]>=a[3])
                return 2;
        }
        else
        {
            if(a[0]<=a[2])
                return 0;
            if(a[1]<=a[3])
                return 3;
        }
        return AB.randomIntAtoB(0,3);
    }

}

function draw()  
{
    function preload() 
    {
        const TEXTURE_WALL = loadImage (  "/uploads/jackoreilly38/1542623610.png" );
        const TEXTURE_AGENT = loadImage ( "/uploads/jackoreilly38/1667.jpg" );
        const TEXTURE_ENEMY =loadImage ("/uploads/jackoreilly38/1542623570.png")
    }

}