Tic Tac Toe 1 Main Method Create 2d String Array Populate 0 1 2 Etc B Call Method Prints Q43807671
NEEDIT IN JAVA PLEASE
Tic-Tac-Toe 1. In the main method a. Create a 2D String array and populate it with “0”,”1″,”2″, etc. b. Call a method which prints the board. You will write this method in a bit. C. Create a scanner which takes keyboard input and loop until the game ends. d. Take input for player X i. Then call a method to mark the board ii. Then check to see if Player X won. e. Take input for player 0 i. Then call a method to mark the board ii. Then check to see if Player O won. f. Thank the players for playing. g. My code is <20 lines. 2. Create the following methods a. public static void printBoard(String a[[ ]][/your code} i. Ugly output takes <10 lines. Get this working first ii. Later, you can make it pretty. That takes about 20 lines b. public static void placeMark(String board[][], int spot, String mark) i. spot is a variable that contains a number 1-9. ii. mark contains either “X” or “O”. iii. My code is <10 lines C. public static boolean checkWin(String b[0][//your code} i. Do one of the following 1. Print “Player X is the winner!” 2. Print “Player O is the winner!” 3. Print “The game is a tie.” 4. Return to game play if there is no winner and no tie. 5. My code is ~40 lines but it is simple. a. Check for a winner in rows b. Check for a winner in columns C. Check for a winner diagonally d. If there is a winner, print results e. Return to main method and keep on playing Show transcribed image text Tic-Tac-Toe 1. In the main method a. Create a 2D String array and populate it with “0”,”1″,”2″, etc. b. Call a method which prints the board. You will write this method in a bit. C. Create a scanner which takes keyboard input and loop until the game ends. d. Take input for player X i. Then call a method to mark the board ii. Then check to see if Player X won. e. Take input for player 0 i. Then call a method to mark the board ii. Then check to see if Player O won. f. Thank the players for playing. g. My code is
Expert Answer
Answer to Tic-Tac-Toe 1. In the main method a. Create a 2D String array and populate it with “0”,”1″,”2″, etc. b. Call a method wh…
OR