Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please respond with the java code, thank you. Tic Tac Toe game on a 6x7 board. Start with a very simple version of the program,

Please respond with the java code, thank you.
Tic Tac Toe game on a 6x7 board.
Start with a very simple version of the program, for example, a version that only allows two human players to compete. For that purpose, you would just need a method that checks whether a move is possible or not (column already full?) and another method that checks whether the game is over and what the result is. The next step could be the random-style computer player; just use the random number generator instead of the user input. Detail functions:
1. Finish the method to print the board
2. Write a method humanMove() that allows the program to take a move from the user.
Your method should be able to validate users input until the user enters a valid move.
For example, if the user enters -1 which is not a valid move, then prompt the user to enter his/her move again
3. Write a method checkPossible() that checks a move is possible or not. If a column is already full, return false; else, return true;
4. Write a method checkWin() that checks whether the game is over and what the result is.
5. Write a method computerMove() that uses the random number generator to generate a
random move (a number between 1 and 7) for the computer.
6. Finish the Human-Human play part in main method ( or a separated method called
humanHumanPlay()).
7. Finish the Computer-Human play part in main method ( or a separated method called
computerHumanPlay()).
This should be implemented in java.

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

MySQL Crash Course A Hands On Introduction To Database Development

Authors: Rick Silva

1st Edition

1718503008, 978-1718503007

Students also viewed these Databases questions

Question

Buddy Dog Foods management to change its focus?

Answered: 1 week ago

Question

=+j Improve the effectiveness of global and virtual teams.

Answered: 1 week ago