public static ArrayList<Point> reverseArray(ArrayList<Point> array) {
        ArrayList<Point> newarray = new ArrayList<Point>();
        for (int c = array.size() - 1; c >= 0; c--) {
            newarray.add(array.get(c));
        }
        return newarray;

    }