Answered step by step
Verified Expert Solution
Link Copied!

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

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

The Structure Of The Relational Database Model

Authors: Jan Paredaens ,Paul De Bra ,Marc Gyssens ,Dirk Van Gucht

1st Edition

3642699588, 978-3642699580

More Books

Students also viewed these Databases questions

Question

=+what kinds of policies and practices should be developed?

Answered: 1 week ago