Question: Create a program named TicTacToe.java then implements the following methods: Part 1: public static void print(String board) It takes a string (1D) representing a TicTacToe

Create a program named TicTacToe.java then implements the following methods: Part 1: public static void print(String board) It takes a string (1D) representing a TicTacToe (TTT) board and display 2D representation of the board. for example, ...xo.x.. then display the board as follows: . . . X O . X . . Part 2: public static String winner(String board) It takes 1D and determines if there is a winner then return the winner symbol, if tie, return null Part 3: public static int[] possibleMove(String board) It returns all possible moves that the player can take. Use the following index for each location: 0, 1, 2 3, 4, 5 6, 7, 8 Part 4: public static String whoseTurn(String board) It returns who move next, if tie, return null Part 5: public static String move(String board) This method uses possibleMove(board) then randomly move to one of the possible moves, the return the updated board. Part 6: Complete the main method to play the game until there is winner or tie. ****(public static void print(String board) public static String move(String board))***** public static void print(String board) please use these methods in each parts.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!