import java.util.*;

public class TicTacToe {
  // Variables ----------------------------------------------------------------
  private int rows, cols;
  private String[][] board = new String[rows][cols];
  private boolean game = false;
  private Scanner in = new Scanner(System.in);
 
  public TicTacToe(){ // when called it starts a new game
    game = true;
  }  
  //AI ------------------------------------------------------------------------
  public void AiMove(){
   //if() 
  }
  //Player methods ------------------------------------------------------------
  public void setBoard(int r, int c){ //Sets the size of the board
   rows = r;
   cols = c;
  }
   public void mark(int r, int c){ //Marks a certain spot. PLAYERS ARE Os
	   if(board[r][c].equals("X") || board[r][c].equals("O"))
	   {
		   System.out.println("Illegal Move, try again");
		   System.out.print("Enter row: ");
		   int rNew = in.nextInt();
		   System.out.print("Enter column: ");
		   int cNew = in.nextInt();
		   mark(rNew,cNew);
	   }
	   board[r][c] = "O";   
  }
  
  public static void main(String[] args) {
  int x;    
  }
}

@@ -234,55 +234,8 @@
 se;%0A
-  private Scanner in = new Scanner(System.in);%0A
  %0A  
@@ -319,120 +319,1013 @@
  %0A  
-//AI ------------------------------------------------------------------------%0A  public void AiMove()%7B%0A   //if() 
+public int countEmpt()%7B // counts the empty spaces left on the board%0A    int spaces = 0;%0A    for(int x = 0; x %3C board.length; x++)%7B //rows%0A        for(int y = 0; y %3C board%5B0%5D.length; y ++)%7B //collums%0A          if(board%5Bx%5D%5By%5D.equals(%22%22))%7B%0A           spaces ++; %0A          %7D%0A    %7D%7D%0A  %7D%0A  public void vCheck()%7B // checks the board vertically for a win%0A%0A  %7D%0A  public void hCheck()%7B // checks the board Horizontally for a win%0A    %0A  %7D%0A  public void sidewayCheck() %7B     %0A  %7D%0A  //AI ------------------------------------------------------------------------%0A  public void AiMove()%7B //AI will pick from 3 random points and choose where to go%0A    int%5B%5D p1 = %7B0,0%7D;%0A    int%5B%5D p2 = %7B0,0%7D;%0A    int%5B%5D p3 = %7B0,0%7D;%0A  for(int i = 0; i %3C board.length; i++) %7B%0A    for(int j = 0; j %3C board%5B%5D.length; j++) %7B%0A    if%0A    %7D%7D %0A   if() %7B%0A  %7D else if() %0A    %7D else if()%7B%0A      for(int x = 0; x %3C board.length; x++)%7B //rows%0A        for(int y = 0; y %3C board%5B0%5D.length; y ++)%7B //collums%0A    %7D%7D%7D// end of the 3 random point if statement
 %0A  %7D
@@ -1580,15 +1580,11 @@
  Os%0A
-%09
    
-if(
 boar
@@ -1594,358 +1594,119 @@
 %5D%5Bc%5D
-.equals(%22X%22) %7C%7C board%5Br%5D%5Bc%5D.equals(%22O%22))%0A%09   %7B%0A%09%09   System.out.println(%22Illegal Move, try again%22);%0A%09%09   System.out.print(%22Enter row: %22);%0A%09%09   int rNew = in.nextInt();%0A%09%09   System.out.print(%22Enter column: %22);%0A%09%09   int cNew = in.nextInt();%0A%09%09   mark(rNew,cNew);%0A%09   %7D%0A%09   board%5Br%5D%5Bc%5D = %22O%22;   %0A  %7D%0A  %0A  public static void main(String%5B%5D args) %7B%0A  int x;
+ = %22O%22;%0A  %7D%0A  %0A  public static void main(String%5B%5D args) %7B%0A  int x;%0A  Scanner in = new Scanner(System.in);%0A    %0A
     

Update to the methods