Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a program named Tictactoe.java then implements the followimg methods: Part 1 public static void print(String board) it takes a string (1D) representing a TicTacToe(TTT)

image text in transcribed

Create a program named Tictactoe.java then implements the followimg 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 0 . X . .

Part 2(10 points):

Create a program named TicTacToe.java then implements the following methods: 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 move(String board) This method uses possibleMove(board) then randomly move to one of the possible moves, the return the updated board. Part 5: Complete the main method to play the game until there is winner or tie. 
Max Points 30

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Current Trends In Database Technology Edbt 2006 Edbt 2006 Workshops Phd Datax Iidb Iiha Icsnw Qlqp Pim Parma And Reactivity On The Web Munich Germany March 2006 Revised Selected Papers Lncs 4254

Authors: Torsten Grust ,Hagen Hopfner ,Arantza Illarramendi ,Stefan Jablonski ,Marco Mesiti ,Sascha Muller ,Paula-Lavinia Patranjan ,Kai-Uwe Sattler ,Myra Spiliopoulou ,Jef Wijsen

2006th Edition

3540467882, 978-3540467885

More Books

Students also viewed these Databases questions