public class AI{
    private Board board;
    public AI(Board board){
        this.board = board;
    }

    public boolean makeMove(){
        if(board.isWhiteTurn()) return false; 
        //First attempt a capture move
		//Create a random list of rows and cols to try
		int[] rows = {0,1,2,3,4,5,6,7};
		int[] cols = {0,1,2,3,4,5,6,7}
		scrambleArr(rows);
		scrambleArr(cols);
        
		for(int x: rows){
            for(int y: cols){
                if(board.isValidSelection(x,y)){
                    int[] newX = {x+2, x-2};
                    int[] newY = {y+2, y-2};
                    for(int tryX: newX)
                        for(int tryY: newY)
                            if(validTarget(tryX, tryY) && calcCapture(x,y,tryX,tryY)) return true;
                }
            }
        }
		for(int x: rows){
            for(int y: cols){
                if(board.isValidSelection(x,y)){
                    System.out.println("VALID SELECTION");
					int[] newX = {x+2, x-2};
                    int[] newY = {y+2, y-2};
                    for(int tryX: newX)
                        for(int tryY: newY)
                            if(validTarget(tryX, tryY) && board.makeMove(x,y,tryX,tryY)) return true;
				}
			}
		}
		return false;
    }

    private boolean calcCapture(int x, int y, int capX, int capY){
        if(board.makeMove(x,y,capX,capY))   //If a possible capture (with double moves) is possible, make it
            if(board.isWhiteTurn()) return true;
            else {
                int[] newX = {x+2, x-2};
                int[] newY = {y+2, y-2};
                for(int tryX: newX)
                    for(int tryY: newY)
                        if(validTarget(tryX, tryY) && calcCapture(x,y,tryX,tryY)) return true;
            }
        return false;
    }
    
    private boolean validTarget(int x, int y){
    return x > -1 && x < 8 && y > -1 && y < 8;
    }
	
	private void scrambleArr(int[] arr){
		for(int i = 0; i < 8; i++){
			int sPos = (int)(Math.random()*8);
			int ePos = (int)(Math.random()*8);
			int temp = arr[ePos];
			arr[ePos] = arr[sPos];
			arr[sPos] = temp;
		}
	}
	
}
@@ -215,18 +215,24 @@
 re move%0A
-%09%09
+        
 //Create
@@ -270,18 +270,24 @@
  to try%0A
-%09%09
+        
 int%5B%5D ro
@@ -310,18 +310,24 @@
 5,6,7%7D;%0A
-%09%09
+        
 int%5B%5D co
@@ -348,19 +348,26 @@
 4,5,6,7%7D
-%0A%09%09
+;%0A        
 scramble
@@ -377,18 +377,24 @@
 (rows);%0A
-%09%09
+        
 scramble
@@ -413,18 +413,24 @@
        %0A
-%09%09
+        
 for(int 
@@ -833,18 +833,24 @@
       %7D%0A
-%09%09
+        
 for(int 
@@ -1001,38 +1001,8 @@
 %22);%0A
-%09%09%09%09%09int%5B%5D newX = %7Bx+2, x-2%7D;%0A
     
@@ -1914,232 +1914,5 @@
   %7D%0A
-%09%0A%09private void scrambleArr(int%5B%5D arr)%7B%0A%09%09for(int i = 0; i %3C 8; i++)%7B%0A%09%09%09int sPos = (int)(Math.random()*8);%0A%09%09%09int ePos = (int)(Math.random()*8);%0A%09%09%09int temp = arr%5BePos%5D;%0A%09%09%09arr%5BePos%5D = arr%5BsPos%5D;%0A%09%09%09arr%5BsPos%5D = temp;%0A%09%09%7D%0A%09%7D%0A%09%0A
 %7D

I'm sorry.