Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

need some help with one part of my assignment just having an input parameter as a reference to another java file. I have this so

need some help with one part of my assignment just having an input parameter as a reference to another java file.

image text in transcribed

image text in transcribed

I have this so far. thanks in advanced

X Ixo Result: OWIN Play again (Y)?:n We are now ready to program our solution. We will reuse the implementation of the class TicTacToeGame from assignment 1. A class Utils has been provided to get a simple access to a few constants and global variables. Player Plaver is an interface. It defines only one method, the method play. Play is void and has one input parameter, a reference to a TicTac ToeGame. HumanPlayer is indeed po the code the game at Human Plaver is a class which implements the interface Player. In its implementation of the method play, it first checks that the game is indeed playable (and prints out an error message is that is not the case), and then queries the user for a valid input, reusing the code that was in the main of the class Tic Tac Toe of assignment 1. Once such an input has been provided, it plays in on the game and returns. ComputerRandom Player ComputerRandom Player is a class which also implements the interface Player. In its implementation of the method play, it first checks that the game is indeed playable (and prints out an error message is that is not the case), and then chose randomly the next move and plays it on the game and returns. All the possible next moves have an equal chance of being played. TON X X 0 Result: OWIN C:\Users\conno\Desktop\IT11121\Assignments\a2_300011530\a2_300011530\Q1\player.java - Notepad++ File Edit Search View Encoding Language Settings Tools Macro Run Plugins Window ? GB of C# B E 1 ENG player java > Human Player java ComputerRandom Player java | Tic Tac Toe java Uhls java import packageName. TickTacToeGame; public interface player E public void play() { NFo ocovo in it WNW TicTacToeGame game = new TicTacToeGame(); game. length: 160 lines: 12 Java source file

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions