src/main/java/Kata.java
/**
     * Get a smaller set of points that are closer together
     *
     * @return smaller set
     */
Get a smaller set of points that are closer together
@return smaller set
Get a smaller set of points that are closer together @return smaller set
public Kata smaller() {
        if (points.size() <= 5) 
            return slowly(); 
        Kata closer = new Kata();
        Point chosen = removeRandom(); 
        closer.shortest = shortest;
        double x = chosen.x;
        double y = chosen.y;
        for (Point nextPoint:  points) {
            double nx = nextPoint.x;
            double ny = nextPoint.y;
            double distance = (x - nx)*(x - nx) + (y - ny) * (y - ny);
            if (closer.shortest > distance)
                closer.shortest = distance;
            closer.addPoint(nextPoint, nx, ny);
        }
        closer.addPoint(chosen, x, y);
        closer.removeLoneOnes();
        addPoint(chosen, x, y);  
        if (closer.points.size() < 2) 
            return slowly();
        if (closer.points.size() == points.size()) 
            return slowly();
        /*
        System.err.println("From " + points.size() + " to " + closer.points.size());
        if (points.size() < closer.points.size()){
            System.err.println("From " + Arrays.toString(points.toArray()));
            System.err.println("To " + Arrays.toString(closer.points.toArray()));
        }
         */
        return closer.smaller(); 
    }
public Kata smaller ( ) { if ( points . size ( ) <= 5 ) return slowly ( ) ; Kata closer = new Kata ( ) ; Point chosen = removeRandom ( ) ; closer . shortest = shortest ; double x = chosen . x ; double y = chosen . y ; for ( Point nextPoint : points ) { double nx = nextPoint . x ; double ny = nextPoint . y ; double distance = ( x - nx ) * ( x - nx ) + ( y - ny ) * ( y - ny ) ; if ( closer . shortest > distance ) closer . shortest = distance ; closer . addPoint ( nextPoint , nx , ny ) ; } closer . addPoint ( chosen , x , y ) ; closer . removeLoneOnes ( ) ; addPoint ( chosen , x , y ) ; if ( closer . points . size ( ) < 2 ) return slowly ( ) ; if ( closer . points . size ( ) == points . size ( ) ) return slowly ( ) ; /*
        System.err.println("From " + points.size() + " to " + closer.points.size());
        if (points.size() < closer.points.size()){
            System.err.println("From " + Arrays.toString(points.toArray()));
            System.err.println("To " + Arrays.toString(closer.points.toArray()));
        }
         */ return closer . smaller ( ) ; }
Get a smaller set of points that are closer together
 @return smaller set
Get a smaller set of points that are closer together @return smaller set
// so we don't redo the tst with same points! // getting near // stop fast looking! // take one of them // get the shortest distance // will be square of the shortest distance // Chosen point // add ourselves // System.out.println(closer.points.size()); // restore this! // gone too far! // not worked! // keep trying