Answered step by step
Verified Expert Solution
Question
1 Approved Answer
/* Output should look like this: 0 1 2 0 | | ----------- 1 | | ----------- 2 | | Row: 1 Col: 1 0
/* Output should look like this: 0 1 2 0 | | ----------- 1 | | ----------- 2 | | Row: 1 Col: 1 0 1 2 0 | | ----------- 1 | X | ----------- 2 | | */ //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\ #include#include using namespace std; //class representing the tic tac toe game class tictactoe { public: //should initialize whose turn it is and the moves array tictactoe() { } //should place an X or O, based on whose turn it is, at location x,y in the moves array bool PlaceMove(int x, int y) { return false; } //draws the board using the moves 2d array void DrawBoard() { } //should return true if there are 3 X's or 3 O's in a row bool GameOver() { return false; } //should return X or O char Winner() { return ' '; } private: char moves[3][3]; bool xturn; }; int main() { tictactoe board; int col, row; do { board.DrawBoard(); cout<<"Row: "; cin >> row; cout<<"Col: "; cin >> col; if(!board.PlaceMove(row,col)) cout<< "Invalid Move" <
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started