(Solved) : Updated Pls Post Solution Multiple People Vote Following Requirements Define Following Cla Q42737137 . . .

For this assignment, you are asked to design and implement the simple game of Tic-Tac-Toe as illustrated in class. The follow

just updated it pls post solution I will have multiple people upvote

The following are the requirements:

Define the following classes:

block.java a block represents a playable celland maintains a state attribute that is either EMPTY, occupied byX, or occupied by O) . By default it is EMPTY, would requiresetState, getState, and a toString where EMPTY is just a blankspace.

board.java a board has or contains 9 blocksin a 2D array (3×3) that shapes the game space of tic-tac-toe. Italso maintains an internal state which can be one of the following:EMPTY (the initial state of the board), X (X claims a win), Y (Yclaims a win), or DRAW (where neither X nor Y can claim a win andno further moves are possible). The board has the key methodsmakeMove( ) that is called by a player making a move and getState()or updateState() that updates the state of the board after everymove. It checks for a win or a draw when they occur. Note that theboard instantiates and maintains all the blocks.

game.java contains a game board and twoplayers, playerX and playerO. It manages the iteration with theplayers. First by getting the player names, does a coin toss todecide the turn and allows each player to take a turn and make amove. It finally announces the winner/draw when the game ends.

player.java is an abstractclass that maintains a design that every player has a symbol (X orO), a name, and an abstract play(board gameboard) method. It alsomaintains a reference to the game board for players to examine andmake their move.

HumanPlayer.java extends player, a type ofplayer that requests its input from the user and submit the move(or play) to the gameboard.

AIPlayer.java extends player, a type ofplayer that implements a simple computer player. The simpleststrategy is to play a valid random move. Feel free to design moredifficult or “intelligent” game players.

TicTacToe.java a simple wrapper class formain, here is its contents:

class TicTacToe {

public static void main(String args[]) {

game myGame = new game();

myGame.start();

}

}

global.java this is a global interface thatis implemented by any class to maintain some shared constants.

Create an interactive console based application ofTic-Tac-Toe.

everything from the image is in the textFor this assignment, you are asked to design and implement the simple game of Tic-Tac-Toe as illustrated in class. The following are the requirements: Define the following classes: -block.java a block represents a playable cell and maintains a state attribute that is either EMPTY, Occupied by X or occupied by O). By default it is EMPTY, would require setState, getState, and a toString where EMPTY is just a blank space. – board.java a board has or contains 9 blocks in a 2D array (3×3) that shapes the game space of tic-tac-toe. It also maintains an internal state which can be one of the following: EMPTY (the initial state of the board), XIX claims a win) Y ( claims a win) or DRAW (where neither X nor Y can claim a win and no further moves are possible! The board has the key methods make Movel) that is called by a player making a move and getState or updateState() that updates the state of the board after every move. It checks for a win or a draw when they occur. Note that the board instantiates and maintains all the blocks. – game.java contains a game board and two players, playerX and player. It manages the iteration with the players. First by getting the player names, does a coin toss to decide the turn and allows each player to take a turn and make a move. It finally announces the winner/draw when the game ends. -player.java is an abstract class that maintains a design that every player has a symbol Xoro a name, and an abstract play board gameboard) method. It also maintains a reference to the game board for players to examine and make their move. – HumanPlayer.java extends player, a type of player that requests its input from the user and submit the move for play to the gameboard. AlPlayer.java extends player, a type of player that implements a simple computer player. The simplest strategy is to play a valid random move. Feel free to design more difficult or “intelligent” game players. Tic Tac Toe.java a simple wrapper class for main, here is its contents: clasa Tic Tac Toe public static void main(Stringar pame Game = new game); Game starto global.java this is a global interface that is implemented by any class to maintain some shared constants. Show transcribed image text For this assignment, you are asked to design and implement the simple game of Tic-Tac-Toe as illustrated in class. The following are the requirements: Define the following classes: -block.java a block represents a playable cell and maintains a state attribute that is either EMPTY, Occupied by X or occupied by O). By default it is EMPTY, would require setState, getState, and a toString where EMPTY is just a blank space. – board.java a board has or contains 9 blocks in a 2D array (3×3) that shapes the game space of tic-tac-toe. It also maintains an internal state which can be one of the following: EMPTY (the initial state of the board), XIX claims a win) Y ( claims a win) or DRAW (where neither X nor Y can claim a win and no further moves are possible! The board has the key methods make Movel) that is called by a player making a move and getState or updateState() that updates the state of the board after every move. It checks for a win or a draw when they occur. Note that the board instantiates and maintains all the blocks. – game.java contains a game board and two players, playerX and player. It manages the iteration with the players. First by getting the player names, does a coin toss to decide the turn and allows each player to take a turn and make a move. It finally announces the winner/draw when the game ends. -player.java is an abstract class that maintains a design that every player has a symbol Xoro a name, and an abstract play board gameboard) method. It also maintains a reference to the game board for players to examine and make their move. – HumanPlayer.java extends player, a type of player that requests its input from the user and submit the move for play to the gameboard. AlPlayer.java extends player, a type of player that implements a simple computer player. The simplest strategy is to play a valid random move. Feel free to design more difficult or “intelligent” game players. Tic Tac Toe.java a simple wrapper class for main, here is its contents: clasa Tic Tac Toe public static void main(Stringar pame Game = new game); Game starto global.java this is a global interface that is implemented by any class to maintain some shared constants.

Expert Answer


Answer to just updated it pls post solution I will have multiple people up vote The following are the requirements: Define the fo…

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us

× How can I help you?