File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed 
src/test/groovy/net/zomis/machlearn/images Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -29,13 +29,13 @@ public static void main(String[] args) {
2929        BineroScan  scan  = new  BineroScan ();
3030        do  {
3131            BufferedImage  image  = MyImageUtil .screenshot ();
32-             scan .run (image , scanner );
32+             scan .run (image , true );
3333            System .out .println ("Go again?" );
3434        } while  (scanner .nextLine ().equals ("y" ));
3535        scanner .close ();
3636    }
3737
38-     public  void  run (BufferedImage  image , Scanner   scanner ) {
38+     public  void  run (BufferedImage  image , boolean   click ) {
3939        ZRect [][] boardRects  = imageToRects (imageToRects , imageToRects .flip (), image );
4040        String  board  = valuesForBoard (image , boardRects );
4141        System .out .println (board );
@@ -61,9 +61,7 @@ public void run(BufferedImage image, Scanner scanner) {
6161            if  (analysis .getTotal () == 1 ) {
6262                String  solution  = IntegerPoints .map (analysis .getSolutions ().get (0 ).getSetGroupValues (), size .get ());
6363                String [] solutionRows  = solution .split ("\n " );
64-                 System .out .println ("Start clicking? (Y/N)" );
65-                 String  in  = "y" ;
66-                 if  (in .equals ("y" )) {
64+                 if  (click ) {
6765                    MyRobot  robot  = new  MyRobot ();
6866                    for  (int  y  = 0 ; y  < solutionRows .length ; y ++) {
6967                        String  solutionRow  = solutionRows [y ];
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments