title: tic tac toe game how to replace the board with x's and o's?
body: <p>Ok it is my first time in a computer class and i have been having some trouble i have an assignment were i have to make a tic tac toe game, using the methods that the teacher gave us and i am not allowed to change the main method. im suppose to create a board that asks the user if they want a 4x4 5x5 or 6x6 and display it using '-'s. I have done that part correctly but i have no idea how to replace the board with the users input of what row and column they want to put their move.</p>
  
  <p>My main problem is in the getMove method. I don't know how to get the input to replace the '-' with an x or o. </p>
  
  <pre><code>import java.util.Scanner;
  import java.util.Random;
  
  public class Lab7 {
  public static int currentPlayer;
  
      public static void main(String[] args) {
          char [] [] board; char win; char player;
          Random randy = new Random();
          int size = getBoardSize();
  
          while(size &gt;= 4) {
              board = createEmptyBoard( size );
              player = getStartingPlayer(randy);
              do {
                  getMove(board, player);
                  player = player=='O'?'X':'O'; 
                  win = checkForWin(board);
              } while(win == 'N'); 
              if(win == 'F'){
                  System.out.printf("\nThe board is Full: no Winner\n");
              } else {
                  System.out.printf("\nThe winner is %c\n", win);
              }
              displayBoard(board);
              size = getBoardSize();
  
          } 
      } 
  
      public static int getBoardSize() {
          int retval;
          Scanner keyboard = new Scanner(System.in);
          do {
              System.out.printf("Enter board size 4, 5, 6 or -1 to quit: ");
              retval = keyboard.nextInt(); 
          } while(retval != 4 &amp;&amp; retval != 5 
                  &amp;&amp; retval != 6 &amp;&amp; retval != -1);
          keyboard.nextLine(); 
  
          return retval; 
      }
  
      public static char getStartingPlayer(Random rangen){
          char retval = 'X'; 
  
  
  
          System.out.printf("\n\tNew Game. Starting player is %c\n", retval);
          return retval;
      } 
  
      public static char [][] createEmptyBoard(int size) {
          char [] [] board = new char [size][size];
          // two loops to fill cells with '-'
          for (int i = 0; i &lt; size; i++) {
          for (int j = 0; j &lt; size; j++)
              if ((board[i][j] == 'x') || (board[i][j] == 'o'))
                  System.out.print(" " + board[i][j]);
              else
                  System.out.print(" -");
          System.out.println();
      } return board;
      }
  
  
  
  public static void getMove(char [][] board, char player){
   int row;
  int column;
  
      System.out.printf("Player %c move\n", player);
      System.out.print("Enter Row:");
      System.out.println();
  
  
        displayBoard(board);  
      }
  
      public static void displayBoard(char [][] board) {     
  
      } 
  
      public static char checkForWin(char [][] board){
          char retval = 'F';
  
          return retval; 
      }    
  } 
  </code></pre>