public static AIMove toAvoid(AIHockeyist hockeyist, AIPoint target) {
        AIManager manager = AIManager.getInstance();
        AIRectangle rink = manager.getRink();
        double maxDistance = 130;

        AIPuck puck = manager.getPuck();

        List<AIHockeyist> opponents = new ArrayList<AIHockeyist>();
        for (AIHockeyist opp : manager.getOpponents()) {
            if (puck.distanceTo(opp) < maxDistance) {
                opponents.add(opp);
            }
        }

        if (opponents.isEmpty()) {
            return to(hockeyist, target);
        }

        // greater score is better, how far puck we from both hockeyists
        double bestScore = 0;
        // from -3 to 3
        double bestTurn = 0;
        // from -1 to 1
        double bestAcceleration = 0;

        for (double acceleration : new double[]{-1, 0, 1}) {
            for (double turn : new double[]{-hockeyist.getMaxTurnPerTick(), 0, hockeyist.getMaxTurnPerTick()}) {
                AIHockeyist next = AIHockeyist.hockeyistNext(hockeyist, acceleration, turn);
                AIPoint p = next.getPuckLocation();

                if (manager.getRink().distanceToInsidePoint(p) < manager.getRink().distanceToInsidePoint(hockeyist.getPuckLocation()) && manager.getRink().distanceToInsidePoint(p) < AIHockeyist.RADIUS) continue;

                double score = 0;
                for (AIHockeyist opp : opponents) {
                    score += pow(p.distance(opp.getLocation()), 2);
                }
                if (score > bestScore) {
                    bestScore = score;
                    bestTurn = turn;
                    bestAcceleration = acceleration;
                }
            }
        }

        AIMove m = new AIMove();
        m.setTurn(bestTurn);
        m.setSpeedUp(bestAcceleration);
        return m;
    }