/** This function allows one player to play a move given an x and y coordinate */
  public void playMove() {
    if ((aiTurn == 1 && xTurn) || (aiTurn == -1 && !xTurn)) playMoveAI();
    else {
      Scanner keyboard = new Scanner(System.in);
      int playerX, playerY;
      do {
        do {
          System.out.print("Enter an X coordinate:\t");
          playerX = keyboard.nextInt();
        } while (playerX < 0 || playerX >= board.length);

        do {
          System.out.print("Enter a Y coordinate:\t");
          playerY = keyboard.nextInt();
        } while (playerY < 0 || playerY >= board[playerX].length);

        if (board[playerY][playerX] != ' ')
          System.out.println(playerX + " " + playerY + " is already occupied!");
      } while (board[playerY][playerX] != ' ');

      board[playerY][playerX] = xTurn ? 'X' : 'O';
    }
    xTurn = !xTurn;
  }