Can you write pusdocode for this code please,
import java.util.*;
public class Tic {
private static boolean playersTurn = true;
private static char[][] board ;
private static boolean isDraw;
private static Scanner scannerForInput;
public static void main(String[] args){
scannerForInput = new Scanner(System.in);
board = new char[3][3];
System.out.println("Lets Begin!");
System.out.println("Use comma seperation for Input. Example : 0,0 ");
initBoard();
gameBoard();
runGame( );
gameBoard();
if(isDraw)
System.out.println("No winner");
}
public static void runGame( ){
if(playersTurn == true){
yourTurn( );
}else{
machineTurn( );
}
}
public static void yourTurn(){
System.out.println("Please enter coordinate of your locaiton(x) : ");
String userInput = scannerForInput.nextLine();
int rowPosition = Integer.parseInt(String.valueOf(userInput.charAt(0))) ;
int columnPosition = Integer.parseInt(String.valueOf(userInput.charAt(2))) ;
if(board[rowPosition][columnPosition] == '.'){
board[rowPosition][columnPosition] = 'X';
checkWinner( );
} else if (board[rowPosition][columnPosition] == 'X' || board[rowPosition][columnPosition] ==
'O'){
playersTurn = true;
System.out.println("Please choose an empty space");
runGame( );
}
isDraw=true;
}
public static void machineTurn(){
if(board[0][0] == '.'){
board[0][0] = 'O';
gameBoard();
yourTurn( );
} else if(board[0][2] == '.'){
board[0][2] = 'O';
gameBoard();
yourTurn( );
} else if(board[2][0] == '.'){
board[2][0] = 'O';
gameBoard();
yourTurn( );
} else if(board[2][2] == '.'){
board[2][2] = 'O';
gameBoard();
yourTurn( );
} else if(board[1][1] == '.'){
board[1][1] = 'O';
gameBoard();
yourTurn( );
} else if(board[0][1] == '.'){
board[0][1] = 'O';
gameBoard();
yourTurn( );
} else if(board[1][0] == '.'){
board[1][0] = 'O';
gameBoard();
yourTurn( );
} else if(board[1][2] == '.'){
board[1][2] = 'O';
gameBoard();
yourTurn( );
} else if(board[2][1] == '.'){
board[2][1] = 'O';
gameBoard();
yourTurn( );
}
}
public static void checkWinner(){
String line = null;
line = board[0][0]+"" + board[0][1]+"" + board[0][2]+"";
if (line.equals("XXX")) {
System.out.println("You won!"); gameBoard();
System.exit(1);
}
else if (line.equals("OOO")) {
System.out.println("You lost!"); gameBoard();
System.exit(1);
}
line = board[1][0]+"" + board[1][1]+"" + board[1][2]+"";
if (line.equals("XXX")) {
System.out.println("You won!"); gameBoard();
System.exit(1);
}
else if (line.equals("OOO")) {
System.out.println("You lost!"); gameBoard();
System.exit(1);
}
line = board[2][0]+"" + board[2][1]+"" + board[2][2]+"";
if (line.equals("XXX")) {
System.out.println("You won!"); gameBoard();
System.exit(1);
}
else if (line.equals("OOO")) {
System.out.println("You lost!"); gameBoard();
System.exit(1);
}
line = board[0][0]+"" + board[1][0]+"" + board[2][0]+"";
if (line.equals("XXX")) {
System.out.println("You won!"); gameBoard();
System.exit(1);
}
else if (line.equals("OOO")) {
System.out.println("You lost!"); gameBoard();
System.exit(1);
}
line = board[0][1]+"" +.