do(a, b) {
        if (a.dist(b) < 50) {
            a.targetX = false;
            a.targetY = false;
            if (!a.taskStarted) {
                a.startTask();
            }
        } else {
            a.targetX = b.x;
            a.targetY = b.y;
        }
    }
// a does this action to b
a does this action to b
a does this action to b
do(a, b) {
        if (a.dist(b) < 50) {
            a.targetX = false;
            a.targetY = false;
            if (!a.taskStarted) {
                a.startTask();
            }
        } else {
            a.targetX = b.x;
            a.targetY = b.y;
        }
    }
do ( a , b ) { if ( a . dist ( b ) < 50 ) { a . targetX = false ; a . targetY = false ; if ( ! a . taskStarted ) { a . startTask ( ) ; } } else { a . targetX = b . x ; a . targetY = b . y ; } }
a does this action to b
a does this action to b