Computers and Technology

Write a program in Java following these pseudocode:

class ticTacToe

{

public:

void play();

//Function to start the play……x /O keep playing …. getXOMove

void displayBoard() const;

//Function to print the board.

bool isValidMove(int x, int y) const;

//Function to determine if a move is valid.

bool getXOMove(char moveSymbol);

//Function to get a move for a player…read row col..check it displayboard…check game status..count nbof moves

status gameStatus();

//Function to determine the current status of the game.

void reStart();

//Function to restart the game.

ticTacToe();

//Default constructor.

//Postcondition: Initializes the board to an empty state.

private:

char board[3][3];

int noOfMoves;

};

//

int main()

{

ticTacToe game;

game. play();

return 0;

}

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 06:00, hilarydodard7099
Which statistical function in a spreadsheet you to see how far each number varies, on average, from the average value of the list?
Answers: 2
image
Computers and Technology, 23.06.2019 18:00, fordkenae
Which is a possible benefit of having a good credit history? having a checking account low interest rate on a car loan high interest rate on a credit card offer bankruptcy
Answers: 1
image
Computers and Technology, 24.06.2019 01:10, jaileen84
Create a program that will take in a single x and y coordinate as the origin. after the input is provided, the output should be all of the coordinates (all 26 coordinates read from the “coordinates. json” file), in order of closest-to-farthest from the origin.
Answers: 1
image
Computers and Technology, 24.06.2019 09:30, bhadd4385
What is the definition of digital literacy?
Answers: 1
Do you know the correct answer?
Write a program in Java following these pseudocode:

class ticTacToe

{
<...

Questions in other subjects:

Konu
Mathematics, 13.02.2020 00:34