public static ArrayList<Point> jarviz(ArrayList<Point> points) {
        ArrayList<Point> copyArray = new ArrayList<Point>();
        for (Shapes.Point point : points) {
            copyArray.add(point);
        }

        ArrayList<Point> bestPoints = new ArrayList<Shapes.Point>();
        Shapes.Point cP = points.get(closestPoint(points));
        bestPoints.add(cP);
        points.remove(cP);
        points.add(cP);

        while (true) {
            int lastIndex = 0;
            for (int i = 0; i < copyArray.size(); i++) {
                if (myCompare(bestPoints.get(bestPoints.size() - 1), copyArray.get(lastIndex), copyArray.get(i)) == -1) {
                    lastIndex = i;
                }
            }
            if (copyArray.get(lastIndex) == bestPoints.get(0)) {
                break;
            } else {
                bestPoints.add(copyArray.get(lastIndex));
                copyArray.remove(lastIndex);
            }
        }

        return bestPoints;
    }